tauchai83 Posted January 26, 2007 Share Posted January 26, 2007 i wonder why the date i echo <?php echo date("d M Y"); ?> can give me the yesterday date...like it display 26 jan instead of 27 jan...i'm from asia...why this happen/ is it the date in php follow europe or us time?today is 27th for my place here... Link to comment https://forums.phpfreaks.com/topic/35893-date-prob/ Share on other sites More sharing options...
tauchai83 Posted January 26, 2007 Author Share Posted January 26, 2007 the date will folo the date on my pc rite? Link to comment https://forums.phpfreaks.com/topic/35893-date-prob/#findComment-170206 Share on other sites More sharing options...
Jessica Posted January 26, 2007 Share Posted January 26, 2007 No, it's server time. PHP is a server-side language. Link to comment https://forums.phpfreaks.com/topic/35893-date-prob/#findComment-170212 Share on other sites More sharing options...
tauchai83 Posted January 26, 2007 Author Share Posted January 26, 2007 but b4 this it did display today's date according to my pc ..i running localhost....how to solve this problem??? i use AppServ..did u mean it follow AppServ localhost server date??? Link to comment https://forums.phpfreaks.com/topic/35893-date-prob/#findComment-170215 Share on other sites More sharing options...
Jessica Posted January 27, 2007 Share Posted January 27, 2007 I realize you're in Asia, but presumably you speak English, and can type it properly. The chatspeak is annoying enough to make me not want to help you.If you were running it on your computer, your computer was the 'server', so it used your time. If you're using a new server, it will use that time. To display the time of a user's computer, you should use a client-side language such as Javascript, or let the user set their timezone and calculate it that way. PHP has no way of telling what the client-computer's settings are. Link to comment https://forums.phpfreaks.com/topic/35893-date-prob/#findComment-170218 Share on other sites More sharing options...
tauchai83 Posted January 27, 2007 Author Share Posted January 27, 2007 oopsss..sorry....i don't know what i wrote here has irritated you...i'm sorry...ok...that's good explaination...thanks...i hope you wont be feel annoyed by my message next time..hehe:) Link to comment https://forums.phpfreaks.com/topic/35893-date-prob/#findComment-170221 Share on other sites More sharing options...
Caesar Posted January 27, 2007 Share Posted January 27, 2007 I feel your pain jesi. ;) Link to comment https://forums.phpfreaks.com/topic/35893-date-prob/#findComment-170224 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.