Hello, Based on your question, I'm assuming the desired timezone you want to run WeeWX under is US/Eastern. If this is incorrect, substitute as appropriate below.
Try this experiment on your shell (assumes bash): $ date # displays date in UTC time (default on your machine) $ TZ=US/Eastern date # displays date in the US Eastern timezone This works as it's possible to set and export any environment variable by specifying it on the command line before the command to be executed. The assignment only applies to the following command and would not affect any subsequent commands. The following solution is completely untested with WeewX so YMMV. >From what I read, it appears possible to define environment variables in a .service file like weewx.service (see the systemd.exec man page): [Service] *Environment="TZ=US/Eastern" * ExecStart=/home/weewx/bin/weewxd --daemon --pidfile=/var/run/weewx.pid /home/weewx/weewx.conf WARNING: Don't do this with an existing database unless you have already reprocessed the data appropriately before restarting WeewX. Otherwise, start with a fresh archive database. Also, since you may need to run the WeeWX utilites from time to time, you should edit your .profile or .bash_profile in your weewx account adding: export TZ=US/Eastern Also make sure when you run sudo from the weewx account, that TZ is set correctly. If not, you may have to edit your .bashrc or sudo config in /etc. In general, you have to be really careful when running any WeeWX commands that the TZ environment variable is set correctly. Hope this helps, -Bill On Friday, March 20, 2020 at 10:33:04 PM UTC-4, GCC Observatory wrote: > > Hello, > > Been using weewx for a while now and have always wondered if there's a way > to configure it to generate reports that use local time (UTC-5 for me) when > the PC clock is set to UTC. I'm asking because my weewx runs on the same > PC as my observatory control software - I'd prefer to set the computer > clock to UTC, but the last time I did that, it messed up the weewx > reports. Can anyone tell me if it's possible to "trick" weewx into > generating local time reports while keeping the computer clock set to UTC? > > Thanks > -- You received this message because you are subscribed to the Google Groups "weewx-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/f4b08a19-9f72-452c-8f5a-8b017ad05f6e%40googlegroups.com.
