Christopher
New member
With PHP version 5.0+ you can use date_default_timezone_set() to set your local timezone in scripts, and then use the date() function to give out the proper date and time for your local area.
HOWEVER I need to use this same concept with the built in function gmdate(). The servers I will be running my code off of use PHP version 4.0
I have the first part running correctly with this code:
// $date = gmdate ("m-d-Y h:i:s A");
NOTE: $date is actually the current date and time, not just the date.
What I don't know how to do is apply my current time zone to this? I have a form that allows you to select the proper time zone and now i need the gmdate() to alter its time (think this is called offset) according to the timezone.
Can anyone help my with this?
HOWEVER I need to use this same concept with the built in function gmdate(). The servers I will be running my code off of use PHP version 4.0
I have the first part running correctly with this code:
// $date = gmdate ("m-d-Y h:i:s A");
NOTE: $date is actually the current date and time, not just the date.
What I don't know how to do is apply my current time zone to this? I have a form that allows you to select the proper time zone and now i need the gmdate() to alter its time (think this is called offset) according to the timezone.
Can anyone help my with this?