Jump to content



Photo

Incorrect time set


  • Please log in to reply
4 replies to this topic

#1 saiarcot895

saiarcot895

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 10 August 2014 - 01:00 AM

Hi,

 

I'm not sure if this is the right section or not.

 

On my VPS, if I run the date command, the time shown is one hour ahead of Eastern Daylight Time. I tried multiple methods to correct this (date -s, ntpdate, etc.). Is there something I can do, or does this need to be corrected on the Haphost side?

 

Thank you.



#2 milralze

milralze

    Member

  • Members
  • PipPip
  • 27 posts
  • LocationBrazil - São Paulo

Posted 10 August 2014 - 01:32 AM

Hi,

 

I'm not sure if this is the right section or not.

 

On my VPS, if I run the date command, the time shown is one hour ahead of Eastern Daylight Time. I tried multiple methods to correct this (date -s, ntpdate, etc.). Is there something I can do, or does this need to be corrected on the Haphost side?

 

Thank you.

 

Access the server as root and type "tzselect"


VPS BY HAPHOST

Servers Counter-Strike 1.6

www.mestreservidores.com.br


#3 Conner

Conner

    Haphost Support Staff

  • Moderators
  • 140 posts
  • LocationSouthport, UK

Posted 10 August 2014 - 04:15 PM

Hi you can use the export function to write a timezone into your VPS's date file

$ export TZ=GMT

for this example I have used GMT any correct timezone abbreviation will work here you can also select timezone offsets for example TZ=GMT-1 will also work here is a list of

the official timezone abbreviations http://www.timeandda...ions/timezones/ these should all work, however i reccomend offsetting your timezone from

GMT or daylight saving if you are using a debian distribution.

 

Kind Regards,

Conner


logo.png

PRCTBpj.pngjkrTvsD.pngCxmhW0x.pngmu8GezS.png

jwY2Lj6.png aywcg7Z.png sIQJdfx.png 1y1jJaf.png CD6em6I.png


#4 saiarcot895

saiarcot895

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 10 August 2014 - 09:24 PM

Neither of these solve the problem. It's not just a time zone problem; it's that the UTC is one hour ahead of the actual UTC. If I gt the unix time right now on my VPS (using date +%s), it will be one hour more than the current unix time.



#5 Onii-sama

Onii-sama

    Member

  • Members
  • PipPip
  • 18 posts

Posted 25 August 2014 - 02:23 PM

ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime

You have to replace Europe/Berlin with your continent and town of your timezone.

 

If it says that /etc/localtime already exists remove it (rm -rf /etc/localtime) and run the ln command again.

 

 

The timezone names can be found here http://php.net/manual/en/timezones.php just choose your continent.


出産 - 始まり, 生活 - 進捗, 死 - 終わり
完了





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users