Is it possible to change the system timezone in the terminal?


I use c9 to push all of my projects to GitHub and I have had issues where the push doesn’t get counted for the day because the timezone is not set. It would be really helpful to have my workspace be in line with the current time I am working.


You can change timezone from commandline same as in any other ubuntu vm

e.g. by running

sudo dpkg-reconfigure tzdata


Thanks! Just to clarify, does that command need to be run on every workspace that is created, or is there a way to have that setting automatically set as new workspaces are created or cloned from GitHub repos?


You could add the command to your Init script, then it will run automatically in every workspace when you create/open them.


unfortunately adding it to init script is not easy since init script runs in the browser
i use the following snippet to automatically install my dotfiles on all my new workspaces

if (/-nightwing\$/.test(services.c9.hostname)) {
    setTimeout(function() {
        services.fs.exists("~/dotfiles", function(exists) {
            if (exists == false) {
                    editorType: "terminal",
                    active: true,
                    document: {
                        terminal: {
                            cwd: "~"
                }, function(e, tab) {
                    var repo = "<myuser>/dotfiles.git"
                        "echo -e '#!/bin/bash\\nssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \"\$@\"' > /tmp/git_ssh",
                        "chmod 755 /tmp/git_ssh",
                        "cd ~",
                        "GIT_SSH=/tmp/git_ssh git clone " + repo,
                        "cd dotfiles",
                        "bash ./",
                    ].join(" &&\\\n") + "\n")
    }, 1000)

the if (/-nightwing\$/.test(services.c9.hostname)) { test is important to not install my dotfiles on collaborator repositories (my username is nightwing).

Init script example