Functions, data structures and other things related to wall clock time.
This module contains utilities to get the current time and create strings with formatted dates and times.
Copies a time string into the buffer, formatted according to the user's time display preferences (such as 12h/24h time). Example results: "7:30" or "15:00".
AM/PM are also outputted with the time if the user's preference is 12h time.
A pointer to the buffer to copy the time string into
The maximum size of buffer
Gets the user's 12/24h clock style preference.
true
if the user prefers 24h-style time display or false
if the user prefers 12h-style time display.
Converts a (day, hour, minute) specification to a UTC timestamp occurring in the future Always returns a timestamp for the next occurring instance, example: specifying TODAY@14:30 when it is 14:40 will return a timestamp for 7 days from now at 14:30.
This function does not support Daylight Saving Time (DST) changes, events scheduled during a DST change will be off by an hour.
WeekDay day of week including support for specifying TODAY
hour specified in 24-hour format [0-23]
minute [0-59]
Checks if timezone is currently set, otherwise gmtime == localtime.
true
if timezone has been set, false otherwise
If timezone is set, copies the current timezone long name (e.g. America/Chicago) to user-provided buffer.
timezone buffer should be at least TIMEZONE_NAME_LENGTH bytes
A pointer to the buffer to copy the timezone long name into
Size of the allocated buffer to copy the timezone long name into
Weekday values.
Today.
Sunday.
Monday.
Tuesday.
Wednesday.
Thursday.
Friday.
Saturday.
The maximum length for a timezone full name (e.g. America/Chicago)
Do you have questions about the Pebble SDK?
Do you need some help understanding something on this page?
You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can send us a message through the website!