From: Paul D. D. <pde...@ix...> - 2013-07-31 21:17:17
|
The archives are full of old questions about how to set the time zone, but no answers that seem to apply. I'm running core-image-xfce on an Overo/Tobi. The /etc/timezone file contained the string America/Los_Angeles, but the time zone info files don't exist. I tried changing it to a time zone specification string like PST8PDT,M03.2.0,M11.1.0 but that didn't work. I tried setting it to UTC-7 (which works in the TZ variable for the "date" command, but that doesn't work. Is there a right way to do this? Is there even a wrong way to do this that sort of works? -- Ciao, Paul D. DeRocco Paul mailto:pde...@ix... |
From: Scott E. <sc...@ju...> - 2013-07-31 22:51:37
|
I have tzdata installed as a package on the image. And I have this post install script in the image recipe as a convenience since I know where we are using the units ... set_local_timezone() { ln -sf /usr/share/zoneinfo/EST5EDT ${IMAGE_ROOTFS}/etc/localtime } ROOTFS_POSTPROCESS_COMMAND += "set_local_timezone ; " ... Dates then show up this way on a running system root@wandboard-dual:/etc# date Wed Jul 31 18:42:34 EDT 2013 root@wandboard-dual:/# ls -l /etc/localtime lrwxrwxrwx 1 root root 27 Jul 31 17:10 /etc/localtime -> /usr/share/zoneinfo/EST5EDT You could create the link after boot as well. The top-level contents of /usr/share/zoneinfo installed by the tzdata package root@wandboard-dual:/etc# ls /usr/share/zoneinfo/ Africa CST6CDT Europe GMT0 MST7MDT Pacific Universal zone.tab America EET GB Greenwich NZ ROC W-SU Asia EST GMT HST NZ-CHAT ROK WET Australia EST5EDT GMT+0 MET PRC UCT Zulu CET Etc GMT-0 MST PST8PDT UTC iso3166.tab -- View this message in context: http://gumstix.8.x6.nabble.com/Time-zone-tp4967622p4967623.html Sent from the Gumstix mailing list archive at Nabble.com. |
From: Paul D. D. <pde...@ix...> - 2013-08-01 00:03:51
|
> From: Scott Ellis [mailto:sc...@ju...] > > I have tzdata installed as a package on the image. > > And I have this post install script in the image recipe as a > convenience > since I know where we are using the units > > ... > set_local_timezone() { > ln -sf /usr/share/zoneinfo/EST5EDT ${IMAGE_ROOTFS}/etc/localtime > } > > ROOTFS_POSTPROCESS_COMMAND += "set_local_timezone ; " > ... > > Dates then show up this way on a running system > > root@wandboard-dual:/etc# date > Wed Jul 31 18:42:34 EDT 2013 > > root@wandboard-dual:/# ls -l /etc/localtime > lrwxrwxrwx 1 root root 27 Jul 31 17:10 /etc/localtime -> > /usr/share/zoneinfo/EST5EDT > > > You could create the link after boot as well. > > The top-level contents of /usr/share/zoneinfo installed by the tzdata > package > > root@wandboard-dual:/etc# ls /usr/share/zoneinfo/ > Africa CST6CDT Europe GMT0 MST7MDT Pacific > Universal zone.tab > America EET GB Greenwich NZ ROC W-SU > Asia EST GMT HST NZ-CHAT ROK WET > Australia EST5EDT GMT+0 MET PRC UCT Zulu > CET Etc GMT-0 MST PST8PDT UTC iso3166.tab That looks great. I'll try it out. -- Ciao, Paul D. DeRocco Paul mailto:pde...@ix... |