diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2013-02-08 22:35:03 +0100 |
---|---|---|
committer | Paul Kocialkowski <contact@paulk.fr> | 2013-02-08 22:35:03 +0100 |
commit | 7bd54b9cea1e094381a1c3aa7def890de37adbd4 (patch) | |
tree | ed83983048137ec6c88bd2edb37145efaa4276e3 | |
parent | 792c4f41ffbee7455fe227159012131d3605552f (diff) | |
download | hardware_ril_samsung-ril-7bd54b9cea1e094381a1c3aa7def890de37adbd4.zip hardware_ril_samsung-ril-7bd54b9cea1e094381a1c3aa7def890de37adbd4.tar.gz hardware_ril_samsung-ril-7bd54b9cea1e094381a1c3aa7def890de37adbd4.tar.bz2 |
MISC: Timezone can be negative: handle that case as well
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r-- | misc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -236,9 +236,10 @@ void ipc_misc_time_info(struct ipc_message_info *info) struct ipc_misc_time_info *nitz = (struct ipc_misc_time_info*) info->data; char str[128]; - sprintf(str, "%02u/%02u/%02u,%02u:%02u:%02u+%02d,%02d", + sprintf(str, "%02u/%02u/%02u,%02u:%02u:%02u%c%02d,%02d", nitz->year, nitz->mon, nitz->day, nitz->hour, - nitz->min, nitz->sec, nitz->tz, 0); + nitz->min, nitz->sec, nitz->tz < 0 ? '-' : '+', + nitz->tz < 0 ? -nitz->tz : nitz->tz, 0); ril_request_unsolicited(RIL_UNSOL_NITZ_TIME_RECEIVED, str, strlen(str) + 1); |