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

tstoeckler’s picture

I 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.

Tebb’s picture

Status: Active » Fixed

Oh 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.

tstoeckler’s picture

No worries! Glad I could help you :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Jeana_with_a_j’s picture

I 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?

tstoeckler’s picture

I 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!