> Wrong answer #1: > print DateTime::Calendar::Mayan->now->date; > > This prints the Mayan date corresponding to the UTC date, which can be > different from the local date. (Which can't be helped, as the local > timezone isn't mentioned.) > > Wrong answer #2: > print DateTime::Calendar::Mayan->from_object( > object => DateTime->now(time_zone => 'Europe/Amsterdam') ); > > (assuming that now() accepts a timezone. if it doesn't, replace the > DateTime object by DateTime->now->set_time_zone( 'Europe/Amsterdam' )) > > Because DT::C::Mayan converts from UTC, and does not keep the timezone > info, this has the same result as answer #1. > > Correct answer: > print DateTime::Calendar::Mayan->from_object( > object => DateTime->now(time_zone => 'Europe/Amsterdam')-> > set_time_zone => 'floating' ));
So you are proposing something like this? print DateTime::Calendar::Mayan->now( timezone => 'Europe/Amsterdam' )->date; > Look at all the websites saying the world will end in 2012. They are > based on the Mayan calendar, which reaches it's "new year" (13.0.0.0.0) > in December 2012. Ok - I'll add this. -J --
