Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
To make the display more concise, I would like to show just the times without the dates in the clock block, so rather than showing a [clock] I would like something like a [time] token or some kind of custom date format option.
Is this already possible and I have missed it?
I don't want to change the site-wide settings.
What do you think?
Comments
Comment #1
tstoecklerI don't quite get the problem you are having.
You can create a custom date type (e.g. "Clock") and set it to a custom date format showing only the time (e.g. "g:i:s"). You can then select that time in your Clock and voila!
I probably missed something, so please do elaborate.
Comment #2
Tebb CreditAttribution: Tebb commentedOh Tobias! It was me missing something not you.
This is not something I look at often, so I forgot that the date formats were set in Drupal 7's admin/config/regional/date-time. I thought they were being set in the Clock module.
Thank you for the lesson. Sorry to waste your time.
Comment #3
tstoecklerNo worries! Glad I could help you :)
Comment #5
Jeana_with_a_j CreditAttribution: Jeana_with_a_j commentedI created a custom date type (g:i A) but when I chose that in the clock block config, I get this error:
Warning: key() expects parameter 1 to be array, boolean given in clock_block_configure() (line 113 of E:\inetpub\wwwroot\sites\all\modules\clock\clock.module).
Line 113 is:
$date_format = variable_get('date_format_' . $date_type, key(system_get_date_formats($date_type)));
What's going on here?
Comment #6
tstoecklerI just saw this. (Generally it's not a good idea to post in issues that have been marked "closed" already, because they don't appear in most listings.) I'm pretty sure this has been fixed in the meantime, but if not please open a new issue for that. Thanks!