Timestamp timezone
Moderators: egami, macek, gesf
Hello,
I am using the following code to display the last modified time of a page, but it shows up as the timezone of the server location, ie Houston. How can I adjust it to display the time for PST?
<!--#config timefmt="%m/%d/%y, %I:%M %p %Z" -->
<!--#echo var="LAST_MODIFIED" -->
Any help greatly appreciated!
Thanks
Mike (newbie)
I am using the following code to display the last modified time of a page, but it shows up as the timezone of the server location, ie Houston. How can I adjust it to display the time for PST?
<!--#config timefmt="%m/%d/%y, %I:%M %p %Z" -->
<!--#echo var="LAST_MODIFIED" -->
Any help greatly appreciated!
Thanks
Mike (newbie)
-
- Last Samuray
- Posts: 824
- Joined: Sun Jun 02, 2002 3:09 am
Ok so I found that
O = Difference to Greenwich time (GMT) in hours Example: +0200.
How would that be added to this line:
<!--#config timefmt="%m/%d/%y, %I:%M %p %Z" -->
O = Difference to Greenwich time (GMT) in hours Example: +0200.
How would that be added to this line:
<!--#config timefmt="%m/%d/%y, %I:%M %p %Z" -->
-
- Last Samuray
- Posts: 824
- Joined: Sun Jun 02, 2002 3:09 am
syntacys of PHP is
<?
echo $variable;
?>
$date date("you date format");
if you want create your own date you mktime() function =)
<?
echo $variable;
?>
$date date("you date format");
if you want create your own date you mktime() function =)
OR... if yer lazy like me.. take the unix timestamp which is in seconds from jan 1, 1970 er somethin like that.. I may be wrong... multiply 60 times 60 (which is the number of seconds in an hour) and multiply it by X the number of hours from the hosts timezone. and now for a wonderful example
lets say a timestamp is 1234567 which is a server in california(PST) but I am in new york (EST) which is 3 hours ahead.
(60*60)*3 .. let me get the windows calculator to do this one...
add 10800 to your timestamp which is 1245367 and do a simple date() function thingy and whoala.. you have the correct time...
you know thinking about it.. that might not be the easiest way to do it.. but... there is always more than one way to skin a cat.
lets say a timestamp is 1234567 which is a server in california(PST) but I am in new york (EST) which is 3 hours ahead.
(60*60)*3 .. let me get the windows calculator to do this one...
add 10800 to your timestamp which is 1245367 and do a simple date() function thingy and whoala.. you have the correct time...
you know thinking about it.. that might not be the easiest way to do it.. but... there is always more than one way to skin a cat.
-
- Last Samuray
- Posts: 824
- Joined: Sun Jun 02, 2002 3:09 am
if ("lazy" == "Pejone")
{
echo "???";
} else {
exit;
}
{
echo "???";
} else {
exit;
}
if('lazy' == 'redcircle')
sleep 5000;
else
exit;
sleep 5000;
else
exit;
I love programming humor.
ummmm...
I dont really know anything about code :cry: , so how would I change this?
<!--#config timefmt="%m/%d/%y, %I:%M %p %Z" -->
<!--#echo var="LAST_MODIFIED" -->
I dont really know anything about code :cry: , so how would I change this?
<!--#config timefmt="%m/%d/%y, %I:%M %p %Z" -->
<!--#echo var="LAST_MODIFIED" -->