Sync my workspace clock on C9 workspace? - ntpdate ERROR


#1

Hello,
i need to implement on my workspace on Two Factor Authentication.
my issue is that i need to sync my workspace clock for the Two Factor Authentication.
i tried to sync the clock with

sudo ntpdate ntp.ubuntu.com

but im getting error , "Can’t adjust the time of day: Operation not permitted"
How can i use Two Factor Authentication and sync the server clock?

Thanks in advance!


#2

Hi
there is no way to change time inside docker container. There is a way to use faketime http://stackoverflow.com/a/41548434/1743328, but the time in cloud9 containers is already synchronized.

Most likely what you need is changing timezone, or changing your code to handle timezones better.

To change timezone you can do the following:

cd etc
sudo rm localtime 
sudo ln -s /usr/share/zoneinfo/Asia/Yerevan localtime   

#3

Thank you for the replay.
I will try that and updated with the result.