| | #1 |
| Active Warrior Join Date: 2011
Posts: 52
Thanks: 0
Thanked 2 Times in 2 Posts
|
I have 2 date/time strings that I need to compare to see if they are the same date / not. One is "Fri, 26 Aug 2011 14:34:55 GMT" and the other is "Sat, 27 Aug 2011 07:03:02 +1000". I guess it's a 2-step process: 1) Convert them both to the same timezone, and then 2) Compare the date component of the date/time to see if they're the same date. I've been searching around and am now totally bewildered and baffled by the various date & time modules available. I have tried a few and can't work out how to do this. I'm not a perl programmer, I'm an occasional dab |
| |
| | #2 | |
| HyperActive Warrior War Room Member Join Date: 2011
Posts: 129
Thanks: 2
Thanked 13 Times in 12 Posts
|
| |
| | ||
| |
| | #3 | |
| Active Warrior Join Date: 2011 Location: New Delhi
Posts: 73
Thanks: 3
Thanked 6 Times in 4 Posts
|
| |
| | ||
| |
| | #4 |
| HyperActive Warrior War Room Member Join Date: 2010 Location: Hesse, Germany
Posts: 349
Thanks: 33
Thanked 82 Times in 64 Posts
|
Welcome to the whole world of pain that is connected to working with time and dates in any programming language ![]() I really recommend that you convert the dates into a timestamp, then you can easily work with addition, subtraction and simple comparisons. You can then always format the timestamps into human-readable format when it's time to show them to a user. |
|
Want to read my personal blog? Tashi Mortier | |
| |
|
| Bookmarks |
| Tags |
| compare, date or times, timezones |
| |