On Sun, May 4, 2014 at 1:19 AM, Carlo E. Prelz [email protected] wrote:
statement in a universal timeline - for that I have to add the
timezone information. But if I say ‘it’s 1399183200’, the definition
is complete. What you don’t have is any information about my space
coordinate. But strtime is about time, not space.
Yes, I understand that.
If you provide both %s and %z, you provide too much information.
But we already have that information!
Here, I’ll put it yet one more time:
DateTime.parse(“1970-01-01 01:00 +0100”).strftime(“%s %z”)
=> “0 +0100”
If we follow your rationale, that should return “0 +0000”, or maybe even
fail.
But we don’t do that. Why? Because if we already have the timezone
information, it doesn’t hurt to simply display it.
As
anyone who studied static knows, if you provide too many resting
points you obtain instability.
What does that even mean? date.strftime(“%s %z”) already returns the
timezone, and there’s no instability.
I share Tadayoshi-san’s conclusions.
And what are those conclusions?
Let me ask the question more pointedly to you.
We already present the timezone when we do DateTime.strftime(“%s
%z”), because it doesn’t hurt. And DateTime.strptime() is the converse
of DateTime.stftime(), and the timezone in is the string, and the
timezone is specified in the format, and we have a field to store the
timezone. So, how could it possibly hurt to simply parse the damn
timezone and store it?