in reply to Simple (I thought) time comparison?
Replacing your time with one here which should trigger the if branch (rather than the else) I am unable to reproduce your findings.
$ perl 1178137.pl The current time is Mon Dec 19 23:40:37 2016 The old time is Mon Dec 19 23:31:00 2016 Half an hour ago is Mon Dec 19 23:10:37 2016 Old time is within a half hour
If you think you have timezone (or DST) problems it is always best to output the epoch times as a diagnostic aid. I suggest you give that a try.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Simple (I thought) time comparison?
by sjessie (Novice) on Dec 20, 2016 at 00:18 UTC | |
by sjessie (Novice) on Dec 20, 2016 at 00:21 UTC | |
by sjessie (Novice) on Dec 20, 2016 at 00:26 UTC | |
by soonix (Chancellor) on Dec 20, 2016 at 09:16 UTC |