allow to use a first|last weekday name when defining a timezone dst
the format of a 'start' or 'end' field in a dst is:
MM-[first|last]:[monday|tuesday|wednesday|thursday|friday|saturday|sunday] HH:MM:SS
or just as beforehand: MM-DD HH:MM:SS
a sample timezone:
{
name = "tz_+01:00d"
id = "40"
offset_str = "+01:00"
dst = (
{
year = "2001"
has_dst = true
offset_str = "+01:00"
start = "03-last-sunday 01:00"
end = "10-last-sunday 01:00"
}
) # end of dst
}
This commit is contained in:
@@ -15,8 +15,8 @@ dst = (
|
||||
year = "2012" # daylight saving time in a specified year
|
||||
has_dst = false # whether the time zone has daylight saving time {bool} in this year
|
||||
offset_str = "00:00" # offset of the daylight saving time
|
||||
start = "" # when the daylight saving time starts, format: MM:DD HH:MM:SS
|
||||
end = "" # when the daylight saving time ends, format: MM:DD HH:MM:SS
|
||||
start = "" # when the daylight saving time starts treated as utc date, format: MM-DD HH:MM:SS or MM-[first|last]:[monday|tuesday|wednesday|thursday|friday|saturday|sunday] HH:MM:SS
|
||||
end = "" # when the daylight saving time ends treated as utc date, format the same as in the start
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
@@ -711,11 +711,12 @@ offset_str = "00:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-25 01:00"
|
||||
end = "10-28 01:00"}
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
}
|
||||
@@ -730,11 +731,12 @@ offset_str = "00:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-25 01:00"
|
||||
end = "10-28 01:00"}
|
||||
year = "1970"
|
||||
has_dst = false
|
||||
offset_str = "00:00"
|
||||
start = ""
|
||||
end = ""
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
}
|
||||
@@ -749,11 +751,12 @@ offset_str = "+01:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-25 01:00"
|
||||
end = "10-28 01:00"}
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
}
|
||||
@@ -768,11 +771,12 @@ offset_str = "+01:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-25 01:00"
|
||||
end = "10-28 01:00"}
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
}
|
||||
@@ -787,11 +791,12 @@ offset_str = "+01:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-25 01:00"
|
||||
end = "10-28 01:00"}
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
}
|
||||
@@ -806,32 +811,12 @@ offset_str = "+01:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-25 01:00"
|
||||
end = "10-28 01:00"}
|
||||
|
||||
{
|
||||
year = "2018"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-25 01:00"
|
||||
end = "10-28 01:00"}
|
||||
|
||||
{
|
||||
year = "2022"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-27 01:00"
|
||||
end = "10-30 01:00"}
|
||||
|
||||
{
|
||||
year = "2023"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-26 01:00"
|
||||
end = "10-29 01:00"}
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
|
||||
@@ -908,11 +893,11 @@ offset_str = "+02:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
has_dst = false
|
||||
offset_str = "00:00"
|
||||
start = ""
|
||||
end = ""
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
@@ -1008,11 +993,11 @@ offset_str = "+02:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
has_dst = false
|
||||
offset_str = "00:00"
|
||||
start = ""
|
||||
end = ""
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
@@ -1068,11 +1053,11 @@ offset_str = "+02:00"
|
||||
dst = (
|
||||
|
||||
{
|
||||
year = "2012"
|
||||
has_dst = false
|
||||
offset_str = "00:00"
|
||||
start = ""
|
||||
end = ""
|
||||
year = "2001"
|
||||
has_dst = true
|
||||
offset_str = "+01:00"
|
||||
start = "03-last-sunday 01:00"
|
||||
end = "10-last-sunday 01:00"
|
||||
}
|
||||
|
||||
) # end of dst
|
||||
|
||||
Reference in New Issue
Block a user