DAKSH101 Posted March 15, 2017 Posted March 15, 2017 I was trying to enable two factor authentication in my website for better security. However the generated code never matches. However same website works fine in my personal laptop's hosting. It seems that tommy's server time is not properly synced.And site logs also shows almost 5-7 minutes behind.Could you please sync it to real time?
wolstech Posted March 15, 2017 Posted March 15, 2017 The clock is accurate on tommy. I just checked and it was only 6 seconds off from the clocks in the room with me. Be aware that the server local time is Pacific.Do you have a script showing this 7 minute gap? EDIT: Per Krydos below, it's not actually Pacific, but UTC with the local timezone set to Los Angeles. Our old servers were actually Pacific...
Byron Posted March 15, 2017 Posted March 15, 2017 Be aware that the server local time is Pacific. Server time is UTC isn't it? When I ssh into Tommy and check date, i get something like this: Wed Mar 15 06:30:51 PDT 2017 But if you add this to a php file, it shows UTC <?php date_default_timezone_set($_SERVER['TZ']); echo date("T"); According to this Moderator discussion, we should be on UTC. I really don't know at this point? http://www.helionet.org/index/topic/26745-server-times/
Krydos Posted March 17, 2017 Posted March 17, 2017 @daksh101, the Tommy server time appears to be correct within a second or two. Unless it was out of sync when you posted this thread, and then it synced itself up afterwards. The time is set up to automatically sync fairly often. @byron, on Stevie and Johnny v1.0 I believe the system clock was set to Pacific time, and the timezone was set to UTC which was a really wonky way to do things, and why people had to write such strange php scripts etc to make it work. On Tommy and Johnny v3.0 the system clock is set to UTC, and the local timezone is set to /etc/localtime -> ../usr/share/zoneinfo/America/Los_Angeles
bdistler Posted March 18, 2017 Posted March 18, 2017 Be aware that the server local time is Pacific.this... $timestamp = "Time at server " . date("m/d/Y H:i:s",time()); shows --> [ PHP server date and time is ==> Sat Mar 18,2017 01:20:20 UTC UTC <== ]
wolstech Posted March 18, 2017 Posted March 18, 2017 It really depends how you view it. I viewed it from SSH since I was on an iPad and had no way of throwing a script together easily, it shows in PST there since that's the timezone the server lives in, hence why I wrote that. It was 3 hours and 6 seconds behind me, so normal considering I'm in Eastern time myself. Also didn't help that it was early and before my coffee...the clock is actually UTC and shows adjusted for timezone. A "true" PST clock would've shown "UTC" and still been 3 hours behind me. ...and why people had to write such strange php scripts etc to make it work. Ah yes, "Coordinated Pacific Time" ...always having to deal with code to add missing hours to keep my program's logs accurate (I want them shown in Eastern). Quite glad the timezone functions work right now.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now