General time error help!

Started on the old forum in December 2009 · view the original in the archive · old links redirect here

3 replies · 395 views · started 16 years ago · 1 min read

3 participants
arg0s12 Developer · 144 posts #1

My site is 6 hour advance in philippines, in my script here's the code, i want to change in my country real time $hourdiff = "13"; $New_Time = time() + ($hourdiff * 3600); $time=date("g:i a",$New_Time); $flipdate = date("l, d F Y g:i a",time() + ($hourdiff * 3600)); print ("$flipdate");

help pls!

arg0s12 Developer · 144 posts #3

Ok, thanks, i'll try it tommorow, when i rent a pc, .

kabooms Developer · 80 posts #4
.htaccess code
SetEnv TZ Asia/Manila

or 

php_value date.timezone Asia/Manila

or in config.php add this

putenv("TZ=Asia/Manla");
$timeadjust = (0 * 60 * 60);

or in php.ini
date.timezone = "Asia/Manila"

<?php
 echo "".date("l d F Y")."<br/>\n";
echo "".date("g:i:s a")."<br/>\n";
?>
output
Manila /Philippines
Saturday 5 December 2009
 10:26:30 am

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close