Jump to content

[Solved] Tommy Time Sync


DAKSH101

Recommended Posts

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?

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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/

 

 

 

 

Link to comment
Share on other sites

@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
Link to comment
Share on other sites

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 <== ]
Link to comment
Share on other sites

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" :P ...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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...