Template talk:Utc

Current time

 * Simple versions


 * Los Angeles:
 * Denver:
 * Chicago:
 * New York:


 * Production versions


 * Los Angeles:
 * Denver:
 * Chicago:
 * New York:

Fractional time zones
Try this: : TimBentley 04:49, 25 March 2006 (UTC)
 * I just updated it, but I can't check it now (I checked some, which work), so feel free to revert if it messed stuff up. TimBentley 18:01, 25 March 2006 (UTC)
 * It screwed up when the minutes were zero, I'll fix it later. TimBentley 18:03, 25 March 2006 (UTC)
 * I changed Template:mod 60; this should work now. TimBentley 21:43, 25 March 2006 (UTC)

Why 12 hour clock?
Why does this template use a 12-hour clock instead of the standard 24-hour clock of UTC, ISO 8601 and ? That would be easier and more consistent. Kusma (討論) 01:40, 30 March 2006 (UTC)
 * Probably because an American made it. I'll look into changing it. TimBentley (talk) 14:58, 30 March 2006 (UTC)

Two-digit minute
We need to find a way to make EXPR return a two-digit minute. Times like 10:8 just confuse me. It should be 10:08 right?

I created two digit to fix this. Please wait till 15:00 (UTC) and then test it. --Uncle Ed 14:17, 14 April 2006 (UTC)

I got : from it, using the subst: prefix with utc just now. I guess it's okay, then. --Uncle Ed 16:03, 14 April 2006 (UTC)


 * Looks awesome Ed. Pcb21 Pete 10:45, 16 April 2006 (UTC)

Mod 24 buggy for negative numbers, plus workaround
The following expression should equal 19 but at the time of writing actually equals. (If that says 19 rather than -5 by the time you're reading this I am going to look silly but it did honest!). This is problematic for occasions where UTC is say 6am and you want the time in Los Angeles to read 23:00 by doing. To avoid having to do ugly workarounds like writing 17 rather -7 as the template argument, I am going to add 24 to the current hour in this template. Pcb21 Pete 10:45, 16 April 2006 (UTC)


 * The patch has now been applied and works. Pcb21 Pete 10:56, 16 April 2006 (UTC)


 * You sure? AFAIK: -5 mod 24 is -5. See Modulo operation. —Locke Cole • t • c 10:55, 16 April 2006 (UTC)


 * Well if there are two different conventions (and I certainly grew up with the way I mentioned), then the +24 will have to be permanent. I don't think readers will take too kindly to 9pm being written as -3! Pcb21 Pete 10:58, 16 April 2006 (UTC)


 * Actually the article you cite agrees with me. Both you and the current implementation are mistaken, I'm afraid. Pcb21 Pete


 * No.. Windows Calculator (using the Scientific view; the Standard view doesn't have a "MOD") returns -5, and a brief console app written in Pascal consisting of the following:

{$APPTYPE CONSOLE} program modtest;

begin WriteLn(-5 mod 24); end.


 * Also says -5 on output. The implementation here is correct, however you seem to have fixed it with the +24. =) So no worries if it works, right? —Locke Cole • t • c 11:46, 16 April 2006 (UTC)


 * Indeed no worries at all, this template is now quite usable IMO. Interesting though. What mathematicians do (see Modular arithmetic) is not the same as what computers do as you rightly corrected me. I'll know that for next time. Pcb21 Pete 12:10, 16 April 2006 (UTC)

Using this template on "many pages"
One reason why it is awkward to use this template on many pages is that you have to change every page individually when there is a daylight savings change. I have devised a template that calls this one, but minimizes the number of pages that need to be changed when there is a daylight savings change (e.g. Western Europe all change their clocks on the same day, so we only need to change one page to keep western European pages up-to-date. Please check out CurrentTimeIn (or CurrentTimeInHeader for a template that takes care of positioning too) and give me feedback. Pcb21 Pete 10:56, 16 April 2006 (UTC)

Blink
I removed the blink formatting, it affected:

"" → ""; should say "time is in ny".

Patrick 12:25, 16 May 2006 (UTC)

Minus
Why must I see "UTC-5" where it should say "UTC &minus; 5" (with a minus sign instead of a hyphen, preceded and followed by proper spaces, per Manual of Style (mathematics))? Michael Hardy (talk) 06:02, 2 February 2009 (UTC)