If I set the TZ environment variable to my timezone (currently PST), Date::Manip::ParseDate seems to incorrectly parse the string 'today' as GMT.
For instance:
$ perl -MDate::Manip -e 'print UnixDate(ParseDate("today"),"%C"),"\n"'
+; date +"%c"
Mon Sep 8 17:15:03 -0700 2003
Mon 08 Sep 2003 05:15:03 PM PDT
# okay so far, the output matches that of UNIX 'date'
$ TZ=PDT perl -MDate::Manip -e 'print UnixDate(ParseDate("today"),"%C"
+),"\n"'; date +"%c"
Tue Sep 9 00:15:04 -0700 2003
Mon 08 Sep 2003 05:15:04 PM PDT
# why does Date::Manip give me GMT and report -0700???
Does anyone know what's going on with Date::Manip?
---
"A Jedi uses the Force for knowledge and defense, never for attack."
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.