General Purpose Date Script

UNIX for Beginners Questions & Answers




Kindly Note - This is a Single User Post by Forum Member targzeta Regarding:
General Purpose Date Script.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old 10-25-2013
targzeta's Unix or Linux Image
targzeta targzeta is offline
Registered User
 
I think the problem is with daylight saving time. But, see this:
Code:
# 1) correct
$> perl date.pl -d 'now + 3 days'
2013-10-28 23:24:14
$> date -d 'now + 3 days'
Mon Oct 28 23:24:20 CET 2013

#2) error:
$> perl date.pl -d '2013/10/25 + 3 days'
2013-10-27 23:00:00
$> date -d '2013/10/25 + 3 days'
Mon Oct 28 00:00:00 CET 2013

I hope this can help you,
Emanuele
The Following User Says Thank You to targzeta For This Useful Post:
Corona688 (10-28-2013)