hey guys.... anyone here know why my time here in localhost is different from the internet, let's say even though i already set my timezone to "America/New_York" the time is still different

@pritaeas thank you for the reply sir, i thought using php date() will use the server time, not unlike javascript that uses the computer's time. Im not that good when it's comes to "time", i thought it was something about daylight saving time that causes it. i had a trouble understanding that too, this is what i tested

timezone = "America/New_York"
in my localhost = October 23, 2012 05:15:22 AM
on the internet = October 23, 2012 05:36:43 AM
so you mean, it's ok if they're not in sync?

When using localhost, the server is your PC. On the internet it's a PC somewhere in a hosting centre. There is no guarantee that both are synced with an (or the same) internet time server. So yes, this is an acceptable difference.

commented: this is so embarrassing, thank you for the enlightenment sir +5

"When using localhost, the server is your PC. On the internet it's a PC somewhere in a hosting centre" OMG im so dumb, what am i thinking.... sorry i got so messed up, because i was working with the staging server and localhost simultaneously, thank you so much for the help and enlightenment sir

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.