The position of the "Time Zone" and "Daylight Saving Time" fields on
the Local Time Information characteristic was inverted. This commit
fix their position.
---
time/server.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/time/server.c b/time/server.c
index be6e196..ddf88ae 100644
--- a/time/server.c
+++ b/time/server.c
@@ -107,13 +107,13 @@ static uint8_t local_time_info_read(struct attribute *a,
tzset();
- /* FIXME: POSIX "daylight" variable only indicates whether there is DST
- * for the local time or not. The offset is unknown. */
- value[0] = daylight ? 0xff : 0x00;
-
/* Convert POSIX "timezone" (seconds West of GMT) to Time Profile
* format (offset from UTC in number of 15 minutes increments). */
- value[1] = (uint8_t) (-1 * timezone / (60 * 15));
+ value[0] = (uint8_t) (-1 * timezone / (60 * 15));
+
+ /* FIXME: POSIX "daylight" variable only indicates whether there is DST
+ * for the local time or not. The offset is unknown. */
+ value[1] = daylight ? 0xff : 0x00;
attrib_db_update(adapter, a->handle, NULL, value, sizeof(value), NULL);
--
1.7.10.4
---
time/server.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/time/server.c b/time/server.c
index ddf88ae..d7bcf2d 100644
--- a/time/server.c
+++ b/time/server.c
@@ -111,8 +111,9 @@ static uint8_t local_time_info_read(struct attribute *a,
* format (offset from UTC in number of 15 minutes increments). */
value[0] = (uint8_t) (-1 * timezone / (60 * 15));
- /* FIXME: POSIX "daylight" variable only indicates whether there is DST
- * for the local time or not. The offset is unknown. */
+ /* FIXME: POSIX "daylight" variable only indicates if DST is used for
+ * the local time or not. Both the offset and whether it's currently
+ * active is unknown. */
value[1] = daylight ? 0xff : 0x00;
attrib_db_update(adapter, a->handle, NULL, value, sizeof(value), NULL);
--
1.7.10.4
Hi Joao,
On Thu, Jul 5, 2012 at 2:37 PM, Jo?o Paulo Rechi Vita
<[email protected]> wrote:
> - /* FIXME: POSIX "daylight" variable only indicates whether there is DST
> - * for the local time or not. The offset is unknown. */
> + /* FIXME: POSIX "daylight" variable only indicates if DST is used for
> + * the local time or not. Both the offset and wheter it's currently
small typo: wheter -> whether
> + * active is unknown. */
> value[1] = daylight ? 0xff : 0x00;
Regards,
--
Anderson Lizardo
Instituto Nokia de Tecnologia - INdT
Manaus - Brazil
---
time/server.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/time/server.c b/time/server.c
index ddf88ae..a5f151e 100644
--- a/time/server.c
+++ b/time/server.c
@@ -111,8 +111,9 @@ static uint8_t local_time_info_read(struct attribute *a,
* format (offset from UTC in number of 15 minutes increments). */
value[0] = (uint8_t) (-1 * timezone / (60 * 15));
- /* FIXME: POSIX "daylight" variable only indicates whether there is DST
- * for the local time or not. The offset is unknown. */
+ /* FIXME: POSIX "daylight" variable only indicates if DST is used for
+ * the local time or not. Both the offset and wheter it's currently
+ * active is unknown. */
value[1] = daylight ? 0xff : 0x00;
attrib_db_update(adapter, a->handle, NULL, value, sizeof(value), NULL);
--
1.7.10.4