added: TimeZone struct (core)

this class has information about a time zone (utf offset, daylight saving time)
       and methods for converting between UTC and local time
       structs User and Config has a TimeZone object
       System::ToLocal() and System::ToUTC() uses it for converting
       (depending whether a user is logged or not)


git-svn-id: svn://ttmath.org/publicrep/winix/trunk@842 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-05-30 19:04:18 +00:00
parent 9d5d088b4a
commit ec773e5f29
31 changed files with 1505 additions and 1150 deletions

View File

@@ -13,6 +13,7 @@
#include <string>
#include "space/spaceparser.h"
#include "htmlfilter.h"
#include "timezone.h"
@@ -374,15 +375,6 @@ public:
// (if true the html code for root is not filtered)
bool editors_html_safe_mode_skip_root;
// temporarily we do not support time zones per user
// there is one offset for all users
// default: 0
int time_zone_offset;
// time zone offset for guests (not logged users)
// default: 0
int time_zone_offset_guest;
// charset used in templates, locales, logs etc.
// default: true (UTF-8)
// if false it means 8-bit ASCII
@@ -478,6 +470,18 @@ public:
// default: 86400 (24 hours)
long reset_password_code_expiration_time;
// time zone for guests
// or for users who don't have time zone set
// following options are read:
// "tz_offset" (long)
// "tz_has_dst" (bool)
// if tz_has_dst is true then also:
// "tz_dst_start" date in the following format: MM:DD HH[:MM[:SS]]
// "tz_dst_end" the same as above
// "tz_dst_offset" (long)
TimeZone time_zone;
Config();
bool ReadConfig(bool errors_to_stdout_, bool stdout_is_closed = true);