0

I bought a shared VPN (Ubuntu 14.04) and installed my software. I am using wordpress and mongo. I need to read some data from mongodb converting seconds in time but my server is in New York and I am in Italy.

How can I change time?

Based on this link steps are:

  • sudo date --set ------------------------------ partially works.

  • sudo hwclock --systohc ---------------- doesn't work.

    Error is:

    Cannot access the Hardware Clock via any known method. 
    

How can I succesfully change date/time?

  • Presumably the time is correct on your server and you just want to change the way dates and times are presented. That's done by changing the server's, or one or more user's, idea of which timezone they are in. What are the contents of the file /etc/timezone ? – Mark Plotnick Mar 15 '17 at 19:43
  • Europe/Madrid. Time on my website is back of 5h. – CiroRa Mar 15 '17 at 20:10
  • If you type TZ=Europe/Rome date, does the time look correct? – Mark Plotnick Mar 15 '17 at 20:26
  • no, nothing changes.... – CiroRa Mar 16 '17 at 11:02

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.