On Sat, Feb 20, 2010 at 10:39:20AM -0500, Mark J. Reed wrote: : I just want to know what Perl 6 time zero is.
Well, there's no such thing as time 0 in Perl 6, in the sense that Instant is more-or-less opaque. But it's currently specced to the TAI epoch, if you force it. I could be argued into 2000, if people can actually agree on how far that is from the TAI epoch. But the internals of Instant are likely to be something like the current year plus an offset from that in any case, so it doesn't really much matter from the standpoint of efficiency which epoch we pick. That says to me that if it's numerically the TAI epoch, it doesn't really matter much that it's a very large number, and using such a large number will tend to discourage people from using it as a number. :) That being said, we could easily have a user-visible constant array with values like %Epoch[2000] and such, and then you can just pick your epoch (if it's on a GMT year boundary). So the first thing a program might do is: my Instant $unix-epoch = %Epoch[1970]; Or maybe it should be a method on Instant: my Instant $unix-epoch .= epoch(1970); Course, that still doesn't solve the problem that POSIX file mod times are ignorant of leap seconds, so subtracting $unix-epoch from it will still have the UTC vs TAI mismatch. I can forgive dead astronomers, but parts of POSIX just oughta die. Some days it seems like standards committees are even worse than governments for standing in the way of progress... Larry