Feature #297
Add configuration option for setting initial time, including DST
Status: | Closed | Start date: | 14 Mar 2014 | |
---|---|---|---|---|
Priority: | Immediate | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | 04 - Root File System | |||
Target version: | 0.10.0 | |||
Severity: | 04 - Low |
Description
I need to understand better how to set this. An initial version would be brute force: set the time and enable/disable DST.
ntpd does set the time on the board if its left running for a while with a network connection. But it should be possible to initialize that time stamp and set the DST.
I need to know how to tell ntp to use DST.
Associated revisions
RM #297: Initial import of PiClock.
RM #297: Initial import of PiClock.
RM #297: Added a real custom widget that draws the analog clock. This is a merger of the ZetCode custom widget example and the clockwidget example I found on github (appropriate credit provided).
RM #297: Added a real custom widget that draws the analog clock. This is a merger of the ZetCode custom widget example and the clockwidget example I found on github (appropriate credit provided).
RM #297: Moved labels after spinners to match checkbox behaviour. Updated comments.
RM #297: Moved labels after spinners to match checkbox behaviour. Updated comments.
RM #297: Add keyboard navigation to calendar widget. Add callbacks for spinners to set clock. Add apply and home buttons.
RM #297: Add keyboard navigation to calendar widget. Add callbacks for spinners to set clock. Add apply and home buttons.
RM #297: Removed unused code brought from videofe template. Merged callbacks when changing hour/minute/pm. Fixed hour hand bug in gtk_piclock_set_time().
RM #297: Removed unused code brought from videofe template. Merged callbacks when changing hour/minute/pm. Fixed hour hand bug in gtk_piclock_set_time().
RM #297: Fix keyboard navigation to use Ctrl-<arrow keys> for month and year. That's more consistant with the arrow key usage of moving around the days of the month.
RM #297: Fix keyboard navigation to use Ctrl-<arrow keys> for month and year. That's more consistant with the arrow key usage of moving around the days of the month.
RM #297: Fix typos in opkg'ing Makefile.
RM #297: Fix typos in opkg'ing Makefile.
RM #297: Fix initalization of hour spinner. Update system time with every user update.
RM #297: Fix initalization of hour spinner. Update system time with every user update.
RM #297: Add icon and splash image. Updated template.
RM #297: Add icon and splash image. Updated template.
RM #297: Adjusted layout of settings column UI components. Added sample gtkrc to be able to test appearance similar to what the default PiBox Media Server UI looks like.
RM #297: Adjusted layout of settings column UI components. Added sample gtkrc to be able to test appearance similar to what the default PiBox Media Server UI looks like.
RM #297: Switched to settimeofday() to see if that works better than stime().
RM #297: Switched to settimeofday() to see if that works better than stime().
RM #297: Potential fix for setting time. A struct is updated by a callback but the actual time change is haned in a g_timer to avoid problems with setting the time inside the gtk callback.
RM #297: Potential fix for setting time. A struct is updated by a callback but the actual time change is haned in a g_timer to avoid problems with setting the time inside the gtk callback.
RM #297: Switch top level layout to a table to help in centering time setting UI components on the right.
RM #297: Switch top level layout to a table to help in centering time setting UI components on the right.
RM #297: Renamed remaining "clock" functions to "piclock" for consistency.
RM #297: Renamed remaining "clock" functions to "piclock" for consistency.
RM #297: Moved system clock setting to right before exit, to remove time changes from UI code. Fixed bug where changing the day of the month was not updating the system clock.
RM #297: Moved system clock setting to right before exit, to remove time changes from UI code. Fixed bug where changing the day of the month was not updating the system clock.
RM #297: Fixed problem with piclock exits causing a restart immediately by having the ENTER key queued and passed to the launcher. The way around this was to use a different key to activate the Home button in piclock - in this case the space bar - so that the queued key doesn't active the launcher on piclock's exit.
RM #297: Fixed problem with piclock exits causing a restart immediately by having the ENTER key queued and passed to the launcher. The way around this was to use a different key to activate the Home button in piclock - in this case the space bar - so that the queued key doesn't active the launcher on piclock's exit.
History
#1
Updated by Hammel almost 7 years ago
- Priority changed from Normal to Urgent
- Severity changed from 03 - Medium to 04 - Low
#2
Updated by Hammel almost 7 years ago
- Priority changed from Urgent to Normal
- Target version changed from 0.9.0 to 0.10.0
Moving configuration tools to 0.10.0.
#3
Updated by Hammel over 6 years ago
- Priority changed from Normal to Immediate
#4
Updated by Hammel over 6 years ago
- Spinners
- Year
- Month
- Day
- Hour
- Minute
- AM/PM Slider (left or right enables respective values)
- DST Slider (on or off)
Year/month/day may also be set using a GtkCalendar.
I see this as having configuration in a left panel and an analog clock in the right.
I might create special widgets for these. ZetCode has an example using Cairo for creating a custom widget. There is a gtk clock widget available on github that is integrated with cairo as well as a real cairo-based clock (overly complex glade+svg design, but source is 1 file). And there is a cairo clock tutorial on developer.gnome.org but its for gtkmm.
#5
Updated by Hammel over 6 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 50
Most of this is now implemented in the piclock app. This merges a proper GTK+ widget structure (as described in ZetCode) with the Cairo-based clock (found on github) and adds configuration options to it.
The app is very primitive. It does handle navigation using arrow keys just fine.
Additional work to be done:- Add month, day, year under the clock in larger font.
- The analog clock works fine but could use a theme (background image over which the hands are drawn).
- The clock hands are blocky - could be cleaned up with some cairo magic - and should color coordinate with any background image (just use a config option for colors).
- There is no DST option yet (but do we really need it?).
- Apply button doesn't change the time on the system yet.
#6
Updated by Hammel over 6 years ago
- % Done changed from 50 to 80
Didn't do much of those last things but I did add the icon and splash images and fixed packaging, along with various other minor nits and bugs.
I installed the opkg tonight and tested it for the first time as an app. It works perfectly except the time, which is being set with stime(), doesn't change. I may need to switch to settimeofday().
#7
Updated by Hammel over 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
It took some experimenting but I finally got piclock to behave properly. I have to use the space bar to activate the home button but that's a minor price to pay. Overall, the settings app works well now.
Closing issue.