raster pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=fed4aafcdc0366edd90ab9c7ebbfa713373672b7

commit fed4aafcdc0366edd90ab9c7ebbfa713373672b7
Author: Shilpa Singh <shilpa.si...@samsung.com>
Date:   Thu Mar 6 21:18:50 2014 +0900

    Avoid Month wrapping by ignoring summer time correction.
    
    Summary:
    This patch fixes the issue of month wrapping due to summer time correction 
is some locales
    by ignoring day light saving mode in mktime
    Signed-off by: M.V.K Sumanth <sumant...@samsung.com>
    
    @fix
    
    Test Plan: Change the date for month were day light saving mode is applied 
and   observe the wrapping.
    
    Reviewers: seoz, Hermet, raster
    
    Reviewed By: raster
    
    CC: govi, raster
    
    Differential Revision: https://phab.enlightenment.org/D590
---
 src/lib/elm_datetime.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elm_datetime.c b/src/lib/elm_datetime.c
index 38a68ae..4004992 100644
--- a/src/lib/elm_datetime.c
+++ b/src/lib/elm_datetime.c
@@ -583,14 +583,14 @@ _max_days_get(int year,
    localtime_r(&t, &time1);
    time1.tm_year = year;
    time1.tm_mon = month;
-   /* To restrict month wrapping because of summer time in some locales,
-    * disable day light saving mode.*/
-   time1.tm_isdst = 0;
    for (day = MIN_DAYS_IN_MONTH; day <= mapping[ELM_DATETIME_DATE].def_max;
         day++)
      {
         time1.tm_mday = day;
         mktime(&time1);
+        /* To restrict month wrapping because of summer time in some locales,
+        * ignore day light saving mode in mktime(). */
+        time1.tm_isdst = -1;
         if (time1.tm_mday == 1) break;
      }
    day--;

-- 


Reply via email to