I am getting the dates from a page and i am using the UnixDate subroutine to get the year, month and date in a specified format. But after the UnixDate processing, for one date i am getting a day before that. The following code shows the printing before and after the UnixDate subroutine
If you see the second and third date in the output, it is one day before to the actual date before the UnixDate processing. Any clue on this? is the time on the date making a difference? How to get the exact date. Atleast i dont want to use regular expression to extract the date. Thanks in advance,print Dumper $tot_start_date; print Dumper $tot_end_date; print Dumper $beta_start_date; print Dumper $beta_end_date; $tot_start_date = UnixDate($tot_start_date,"%Y-%m-%d"); $tot_end_date = UnixDate($tot_end_date,"%Y-%m-%d"); $beta_start_date = UnixDate($beta_start_date,"%Y-%m-%d"); $beta_end_date = UnixDate($beta_end_date,"%Y-%m-%d"); print Dumper $tot_start_date; print Dumper $tot_end_date; print Dumper $beta_start_date; print Dumper $beta_end_date; And here is the output: $VAR1 = '2008-06-27 17:37:11 +0000'; $VAR1 = '2008-09-29 04:02:18 +0000'; $VAR1 = '2008-09-29 04:02:18 +0000'; $VAR1 = '2009-01-07 00:00:00 -0800'; $VAR1 = '2008-06-27'; $VAR1 = '2008-09-28'; $VAR1 = '2008-09-28'; $VAR1 = '2009-01-07';
In reply to UnixDate - getting a different date by d-evil
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |