git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix: wrong offset for CET timezone
@ 2014-06-26 13:53 Alan Franzoni
  2014-06-26 22:08 ` Robin Rosenberg
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Franzoni @ 2014-06-26 13:53 UTC (permalink / raw)
  To: git; +Cc: Alan Franzoni

From: Alan Franzoni <username@franzoni.eu>

Signed-off-by: Alan Franzoni <username@franzoni.eu>
---
 Documentation/date-formats.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt
index ccd1fc8..284308a 100644
--- a/Documentation/date-formats.txt
+++ b/Documentation/date-formats.txt
@@ -11,7 +11,7 @@ Git internal format::
 	It is `<unix timestamp> <time zone offset>`, where `<unix
 	timestamp>` is the number of seconds since the UNIX epoch.
 	`<time zone offset>` is a positive or negative offset from UTC.
-	For example CET (which is 2 hours ahead UTC) is `+0200`.
+	For example CET (which is 1 hour ahead UTC) is `+0100`.
 
 RFC 2822::
 	The standard email format as described by RFC 2822, for example
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix: wrong offset for CET timezone
  2014-06-26 13:53 [PATCH] Fix: wrong offset for CET timezone Alan Franzoni
@ 2014-06-26 22:08 ` Robin Rosenberg
  2014-06-27  7:48   ` Andreas Schwab
  2014-06-27  8:24   ` Alan Franzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Robin Rosenberg @ 2014-06-26 22:08 UTC (permalink / raw)
  To: Alan Franzoni; +Cc: git, Alan Franzoni



----- Ursprungligt meddelande -----
> Från: "Alan Franzoni" <mailing@franzoni.eu>
> Till: git@vger.kernel.org
> Kopia: "Alan Franzoni" <username@franzoni.eu>
> Skickat: torsdag, 26 jun 2014 15:53:32
> Ämne: [PATCH] Fix: wrong offset for CET timezone
> 
> From: Alan Franzoni <username@franzoni.eu>
> 
> Signed-off-by: Alan Franzoni <username@franzoni.eu>
> ---
>  Documentation/date-formats.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/date-formats.txt b/Documentation/date-formats.txt
> index ccd1fc8..284308a 100644
> --- a/Documentation/date-formats.txt
> +++ b/Documentation/date-formats.txt
> @@ -11,7 +11,7 @@ Git internal format::
>  	It is `<unix timestamp> <time zone offset>`, where `<unix
>  	timestamp>` is the number of seconds since the UNIX epoch.
>  	`<time zone offset>` is a positive or negative offset from UTC.
> -	For example CET (which is 2 hours ahead UTC) is `+0200`.
> +	For example CET (which is 1 hour ahead UTC) is `+0100`.

1 hour in winter and 2 in summer, although some standards seem to say
that summer time is really called CEST, computers apply DST to CET in summer.

$ TZ=UTC date
Tor 26 Jun 2014 22:08:01 UTC

$ TZ=CET date
Fre 27 Jun 2014 00:08:05 CEST

-- robin
 
>  RFC 2822::
>  	The standard email format as described by RFC 2822, for example
> --
> 2.0.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix: wrong offset for CET timezone
  2014-06-26 22:08 ` Robin Rosenberg
@ 2014-06-27  7:48   ` Andreas Schwab
  2014-06-27  8:24   ` Alan Franzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Schwab @ 2014-06-27  7:48 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: Alan Franzoni, git, Alan Franzoni

Robin Rosenberg <robin.rosenberg@dewire.com> writes:

> $ TZ=CET date
> Fre 27 Jun 2014 00:08:05 CEST

That only works because CET is a special zone name (POSIX time zones
require at least a number to denote the standard offset), similar to
Europe/Berlin but without the history.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix: wrong offset for CET timezone
  2014-06-26 22:08 ` Robin Rosenberg
  2014-06-27  7:48   ` Andreas Schwab
@ 2014-06-27  8:24   ` Alan Franzoni
  2014-06-27  8:51     ` Robin Rosenberg
  1 sibling, 1 reply; 5+ messages in thread
From: Alan Franzoni @ 2014-06-27  8:24 UTC (permalink / raw)
  To: Robin Rosenberg; +Cc: git, Alan Franzoni, schwab

On Fri, Jun 27, 2014 at 12:08 AM, Robin Rosenberg
<robin.rosenberg@dewire.com> wrote:
> 1 hour in winter and 2 in summer, although some standards seem to say
> that summer time is really called CEST, computers apply DST to CET in summer.
>
> $ TZ=UTC date
> Tor 26 Jun 2014 22:08:01 UTC
>
> $ TZ=CET date
> Fre 27 Jun 2014 00:08:05 CEST

Like Andreas pointed out, this seems an implementation detail. CET is
still +1, while CEST is +2.

If you take a look at the official IANA tzdata:

http://www.iana.org/time-zones/repository/releases/tzdata2014e.tar.gz

For europe, it's something like "std: CET" and "dst: CEST".

The current doc is not correct either; we should write something like
"either +1 or +2 depending on DST" (there seems to be a 2dst as well
which gets +3 offset);

Usually the best way of handling timezones is to use the proper
location format (e.g. TZ='Europe/Rome') and then letting the system
pick the proper offset; we might say something like ' "Europe/Rome"
which is +1 in winter ' in the doc, but I'd say that's nitpicking.


-- 
contact me at public@[mysurname].eu

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] Fix: wrong offset for CET timezone
  2014-06-27  8:24   ` Alan Franzoni
@ 2014-06-27  8:51     ` Robin Rosenberg
  0 siblings, 0 replies; 5+ messages in thread
From: Robin Rosenberg @ 2014-06-27  8:51 UTC (permalink / raw)
  To: Alan Franzoni; +Cc: git, Alan Franzoni, schwab



----- Ursprungligt meddelande -----
> Från: "Alan Franzoni" <mailing@franzoni.eu>
> Till: "Robin Rosenberg" <robin.rosenberg@dewire.com>
> Kopia: git@vger.kernel.org, "Alan Franzoni" <username@franzoni.eu>, schwab@linux-m68k.org
> Skickat: fredag, 27 jun 2014 10:24:23
> Ämne: Re: [PATCH] Fix: wrong offset for CET timezone
> 
> On Fri, Jun 27, 2014 at 12:08 AM, Robin Rosenberg
> <robin.rosenberg@dewire.com> wrote:
> > 1 hour in winter and 2 in summer, although some standards seem to say
> > that summer time is really called CEST, computers apply DST to CET in
> > summer.
> >
> > $ TZ=UTC date
> > Tor 26 Jun 2014 22:08:01 UTC
> >
> > $ TZ=CET date
> > Fre 27 Jun 2014 00:08:05 CEST
> 
> Like Andreas pointed out, this seems an implementation detail. CET is
> still +1, while CEST is +2.

I mentioned that myself... 
 
> If you take a look at the official IANA tzdata:
> 
> http://www.iana.org/time-zones/repository/releases/tzdata2014e.tar.gz
> 
> For europe, it's something like "std: CET" and "dst: CEST".
> 
> The current doc is not correct either; we should write something like
> "either +1 or +2 depending on DST" (there seems to be a 2dst as well
> which gets +3 offset);

I knew there gotta be a catch. I don't think glibc is advanced enough
to provide two different summer times for the same TZ.

> Usually the best way of handling timezones is to use the proper
> location format (e.g. TZ='Europe/Rome') and then letting the system
> pick the proper offset; we might say something like ' "Europe/Rome"
> which is +1 in winter ' in the doc, but I'd say that's nitpicking.

Probably is. I think mentioning that CET can be either +1 or +2 is
enough. 

+ For example CET (here), which is nominally 1 hour ahead of UTC is encoded 
+ as `+0100`, but when summer savings apply, CET is two hours ahead and encoded
+ as `+0200`).

-- robin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-06-27  8:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-26 13:53 [PATCH] Fix: wrong offset for CET timezone Alan Franzoni
2014-06-26 22:08 ` Robin Rosenberg
2014-06-27  7:48   ` Andreas Schwab
2014-06-27  8:24   ` Alan Franzoni
2014-06-27  8:51     ` Robin Rosenberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).