Hi All,
I have this strange scenario.
Code:
[root@server 1]# perl -MTime::ParseDate -e 'printf "%s\n", &parsedate("2012-10-25 10:28:41")'
This gives the answer as : 1351178921
Code:
[root@server 1]# perl -MTime::Format -e 'printf "%s\n", $time{'yyyymmdd_hhmmss',1351178921}'
This Gives the asnwer as : 20121025_102841 ( This is correct as expected )
But when i run the same code in another server it gives out different result for Time::Format
Code:
[root@server 2]# perl -MTime::Format -e 'printf "%s\n", $time{'yyyymmdd_hhmmss',1351178921}'
This Gives the asnwer as : 20121025_102817 ( Wrong answer)
I dont understand why we have a difference of ~24 sec between the result created in these two server ....they are using the same version of perl module and all configuration are similar.
The only differnce i notice that the System Time between both server varies by ~24 seconds.So my question is dose Time::Format consider the SYSTEM TIME for conversion....are they related ?
Sserver 1 : Result for date Command
Tue Nov 6 01:18:15 EST 2012
Server 2 : Result for date Command
Tue Nov 6 01:17:51 EST 2012
Any suggestion on what causing this issue ?
Regards
Ashesh