SNVT_time_zone

Overview:

Time zone descriptor.  (offset, type, startDST, endDST.) .   

Time Zone with Daylight-Savings Time (DST).

EXAMPLES

Example 1

SNVT_time_zone TimeZone;

// Definition of time zone for Prague, Czech Republic, local time = GMT + TimeZone.second_time_offset
s32_from_ascii("3600", &(TimeZone.second_time_offset));

// Definition of type of description of time zone
TimeZone.type_of_description = CAL_MEU;

// Definition of time of start and end of DST -> 02:00:00
TimeZone.hour_of_start_DST = 2;
TimeZone.minute_of_start_DST = 0;
TimeZone.second_of_start_DST = 0;
TimeZone.hour_of_end_DST = 2;
TimeZone.minute_of_end_DST = 0;
TimeZone.second_of_end_DST = 0;

// Definition of date of start DST - Sunday of 4 week in March
TimeZone.start_DST.M_start_DST.month_of_start_DST = 3;
TimeZone.start_DST.M_start_DST.week_of_start_DST = 4;
TimeZone.start_DST.M_start_DST.dateday_of_start_DST = 0;

// Definition of date of end DST - Sunday of 4 week in September
TimeZone.end_DST.M_end_DST.month_of_end_DST = 9;
TimeZone.end_DST.M_end_DST.week_of_end_DST = 4;
TimeZone.end_DST.M_end_DST.dateday_of_end_DST = 0;

Example 2

// Definition of time zone for country X, that has start DST in every year 30. March and end of DST 1. September

s32_from_ascii("-36000", &(TimeZone.second_time_offset));

// Definition of type of description of time zone
TimeZone.type_of_description =CAL_JUL ;

// Definition of time of start and end of DST -> 02:00:00
TimeZone.hour_of_start_DST = 2;
TimeZone.minute_of_start_DST = 0;
TimeZone.second_of_start_DST = 0;
TimeZone.hour_of_end_DST = 2;
TimeZone.minute_of_end_DST = 0;
TimeZone.second_of_end_DST = 0;

// Definition of day of start DST – 30. March
TimeZone.start_DST.J_day_of_start_DST = 89;

// Definition of day of end DST – 1. September
TimeZone.end_DST.J_day_of_end_DST =244;

Example 3

// Definition of time zone for country Y, that has start DST in the not leap year 20. February and end of DST 1. September.

// In the leap year has start DST 20. February and end of DST 31. August
s32_from_ascii("-56000", &(TimeZone.second_time_offset));

// Definition of type of description of time zone
TimeZone.type_of_description =CAL_GREG ;

// Definition of time of start and end of DST -> 02:00:00
TimeZone.hour_of_start_DST = 2;
TimeZone.minute_of_start_DST = 0;
TimeZone.second_of_start_DST = 0;
TimeZone.hour_of_end_DST = 2;
TimeZone.minute_of_end_DST = 0;
TimeZone.second_of_end_DST = 0;

// Definition of day of start DST – 20. February
TimeZone.start_DST.G_day_of_start_DST = 50;

// Definition of day of end DST – 1. September – not leap year, leap year 31. August
TimeZone.end_DST.G_day_of_end_DST = 243;


Details:

Resource Set: Standard 00:00:00:00:00:00:00:00-0
Index: 134
Obsolete: no
Size: 15
Programmatic Name: SNVT_time_zone
Neuron C Type:
Structure
second_time_offsetOffset from GMT.  (seconds) .  West direction is negative offset. 
 
s32_type
Minimum: -86400
Maximum: 86400
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
type_of_descriptionCalendar type.  (calendar type names.) .   
 
calendar_type_t
hour_of_start_DSTDST start hour.  (hours) .   
 
unsigned short
Minimum: 0
Maximum: 23
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
minute_of_start_DSTDST start minute.  (minutes) .   
 
unsigned short
Minimum: 0
Maximum: 59
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
second_of_start_DSTDST start second.  (seconds) .   
 
unsigned short
Minimum: 0
Maximum: 59
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
start_DSTDST start day.  (day descriptor.) .  Daylight savings time start day. 
 
Union
G_day_of_start_DSTGregorian calendar day of start DST.  (days) .   
 
unsigned long
Minimum: 0
Maximum: 365
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
J_day_of_start_DSTJulian calendar day of start DST.  (days) .   
 
unsigned long
Minimum: 1
Maximum: 365
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
M_start_DSTMeu calendar day of start DST.  (month, week, dateday.) .   
 
Structure
month_of_start_DSTMonth of start DST.  (months) .   
 
bitfield
Signed: no
Width: 4
Offset: 0
Minimum: 1
Maximum: 12
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
week_of_start_DSTWeek of start DST.  (weeks) .   
 
bitfield
Signed: no
Width: 3
Offset: 4
Minimum: 1
Maximum: 5
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
dateday_of_start_DSTDay of week.  (day names.) .   
 
days_of_week_t
hour_of_end_DSTDST end hour.  (hours) .   
 
unsigned short
Minimum: 0
Maximum: 23
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
minute_of_end_DSTDST end minute.  (minutes) .   
 
unsigned short
Minimum: 0
Maximum: 59
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
second_of_end_DSTDST end second.  (seconds) .   
 
unsigned short
Minimum: 0
Maximum: 59
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
end_DSTDST end day.  (day descriptor.) .  Daylight savings time end day. 
 
Union
G_day_of_end_DSTGregorian calendar day of end DST.  (days) .   
 
unsigned long
Minimum: 0
Maximum: 365
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
J_day_of_end_DSTJulian calendar day of end DST.  (days) .   
 
unsigned long
Minimum: 1
Maximum: 365
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
M_end_DSTMeu calendar day of end DST.  (month, week, dateday.) .   
 
Structure
month_of_end_DSTMonth of end DST.  (months) .   
 
bitfield
Signed: no
Width: 4
Offset: 0
Minimum: 1
Maximum: 12
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
week_of_end_DSTWeek of end DST.  (weeks) .   
 
bitfield
Signed: no
Width: 3
Offset: 4
Minimum: 1
Maximum: 5
Scaling (A,B,C): 1,  0,  0
Scaled value: 1 *10 0 *(Raw+0)
Resolution: 1
dateday_of_end_DSTDay of week.  (day names.) .   
 
days_of_week_t
Formats:

SNVT_time_zone:  text(("%d %m %d:%d:%d ", second_time_offset, type_of_description, hour_of_start_DST, minute_of_start_DST, second_of_start_DST),((type_of_description == 0) ? ("%d %d:%d:%d %d" ,start_DST.G_day_of_start_DST, hour_of_end_DST,minute_of_end_DST, second_of_end_DST, end_DST.G_day_of_end_DST) : ((type_of_description == 1) ? ("%d %d:%d:%d %d" , start_DST.J_day_of_start_DST, hour_of_end_DST, minute_of_end_DST, second_of_end_DST,end_DST.J_day_of_end_DST) : ((type_of_description == 2) ? ("%d %d %m %d:%d:%d %d %d %m", start_DST.M_start_DST.month_of_start_DST, start_DST.M_start_DST.week_of_start_DST, start_DST.M_start_DST.dateday_of_start_DST, hour_of_end_DST, minute_of_end_DST, second_of_end_DST, end_DST.M_end_DST.month_of_end_DST, end_DST.M_end_DST.week_of_end_DST, end_DST.M_end_DST.dateday_of_end_DST) : ("UNKNOWN")))))

SNVT_time_zone#LO:  text(("%d %m ", second_time_offset, type_of_description), time(hour_of_start_DST, minute_of_start_DST, second_of_start_DST), ((type_of_description == 0) ?((" %d " , start_DST.G_day_of_start_DST), time(hour_of_end_DST, minute_of_end_DST, second_of_end_DST), (" %d", end_DST.G_day_of_end_DST)) :((type_of_description == 1) ?((" %d " , start_DST.J_day_of_start_DST), time(hour_of_end_DST, minute_of_end_DST, second_of_end_DST), (" %d", end_DST.J_day_of_end_DST)) :((type_of_description == 2) ?((" %d %d %m ", start_DST.M_start_DST.month_of_start_DST, start_DST.M_start_DST.week_of_start_DST, start_DST.M_start_DST.dateday_of_start_DST), time(hour_of_end_DST, minute_of_end_DST,second_of_end_DST), (" %d %d %m", end_DST.M_end_DST.month_of_end_DST, end_DST.M_end_DST.week_of_end_DST, end_DST.M_end_DST.dateday_of_end_DST)) :("UNKNOWN")))))

Used by:

SCPTtimeZone