Re: Issue with STRFTIME and Daylight Savings
| From: | Malcolm Green | Date: | Tue, 04 Dec 2007 05:48:49 +0000 |
| Subject: | Re: Issue with STRFTIME and Daylight Savings | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-265447@lists.php.net to get a copy of this message | ||
Hi Rob:
Thanks for the feedback.
Just to throw one in from "left field", the script is written in AWK, not
PHP (told you I was a novice!)
Have confirmed that 'systime' refers to hardware clock, so I have a quick
and dirty work-around by adding '3600' (seconds) to STRFTIME, but will look
into a cleaner solution.
Thanks & Regards,
Malcolm.
Malcolm Green
Voice Consultant, Managed Network Services
CSC Australia Pty Limited
M: 0401-002-569
T: (02) 9034-3114
E: malcolm.green@csc.com.au
"Vision without action is a dream; action without vision is a nightmare." -
Chinese Proverb
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. NOTE: Regardless of content, this e-mail shall not operate to
bind CSC to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of e-mail
for such purpose.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Robert Cummings
<robert@interjinn
.com> To
Malcolm Green <mgreen38@csc.com.au>
03/12/2007 04:53 cc
PM php-general@lists.php.net
Subject
Re: [PHP] Issue with STRFTIME and
Daylight Savings
On Mon, 2007-12-03 at 15:14 +1000, Malcolm Green wrote:
> Hi Support:
>
> I've moved into a new role and inherited a system which uses the
'STRFTIME'
> function to create a filename in the form 'strftime("%Y%m%d")'; the
> filename is supposed to be "today's date". (Note I've left out the file
> extension for clarity.)
>
> I've noticed that system creates the wrong filename when the process runs
> between midnight and 12:59am, during Daylight Savings time. That is, it
> creates a filename equal to "yesterday's date". When run at 1:00am or
> later, everything OK.
>
> I've checked the Date/Time and 'Locale' settings in Windows, and
everything
> is ok. My initial thought was that STRFTIME was looking a the system
clock
> rather than Windows (?).
>
> Can you help?
>
> (PS ... please be gentle, I'm a novice at PHP!)
Check your timezone settings in php.ini
Cheers,
Rob.
--
...........................................................
SwarmBuy.com - http://www.swarmbuy.com
Leveraging the buying power of the masses!
...........................................................