/* * This file is a part of Winix * and is not publicly distributed * * Copyright (c) 2012, Tomasz Sowa * All rights reserved. * */ #include "timezones.h" #include "misc.h" #include "log.h" TimeZones::TimeZones() { Clear(); } time_t TimeZones::ParseOffset(const wchar_t * str) { PT::Date date; bool is_sign = false; time_t offset = 0; str = SkipWhite(str); if( *str == '-' ) { is_sign = true; str += 1; } else if( *str == '+' ) { str += 1; } if( date.ParseTime(str) ) { offset = date.hour * 60 * 60 + date.min * 60; if( is_sign ) offset = -offset; } return offset; } void TimeZones::ParseZones() { for(size_t i=0 ; i