Welcome Guest, Not a member yet? Register   Sign In
Setting the Server Time
#1

[eluser]Unknown[/eluser]
Hey there-- I'm new with CodeIgniter. Absolutely loving it so far.

But I have a basic PHP question. Is it possible to set the server time in code? I have a Unix timestamp (seconds since 1970) of a remote server and I want to use that to set my server's time for synchronization. The only functions in PHP that I can find appear as though they only change the time of a date_time object, which is not what I want (I think?).

How can I do this (if possible)?

Thanks in advance!
#2

[eluser]Unknown[/eluser]
(bump)
#3

[eluser]Nikhil Vijayan[/eluser]
the only way i know to change the time to a timezone of our wish in php is

Code:
date_default_timezone_set('Asia/calcuta')

and it works only in php 5




Theme © iAndrew 2016 - Forum software by © MyBB