in reply to Re^2: Getting times (weeks, days, hours, minutes, seconds)
in thread Getting times (weeks, days, hours, minutes, seconds)
Unfortunately, it doesn't produce the result one would expect because DateTime(::Duration) realises that not every minute has 60 seconds. Some are longer due to leap seconds.Ah, so, Date::Time favours geek correctness over usability. And by doing so, it's not POSIX compliant (as POSIX says leap seconds are to be ignored). While taking care of leap seconds is useful in some cases, stubbornly refusing to do second/minute conversion because of a leap second every few years most of society ignores without problems makes the module far less useful than it could be.From the docs, the only conversions possible are:
- years ⇔ months
- weeks ⇔ days
- hours ⇔ minutes
- seconds ⇔ nanoseconds
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Getting times (weeks, days, hours, minutes, seconds)
by ikegami (Patriarch) on Jul 05, 2010 at 16:18 UTC |