25 &
operator(-),
operator(+)
27 use dc_message,
only: messagenotify
28 use dc_trace,
only: beginsub, endsub
29 use dc_string,
only: stoi
32 character(*),
intent(in):: zone
33 logical,
intent(out),
optional:: err
36 character(STRING) :: zone_in, cause_c
37 character(*),
parameter :: subname =
'DCDateTimeSetZone'
39 call beginsub(subname,
'time=%c, zone=%c', &
40 & c1=trim(
tochar(time)), c2=trim(zone))
47 if (
present(err))
then
48 call messagenotify(
'W', subname, &
49 &
'zone=<%c> is invalid.', &
56 call eval(time, zone = zone_in)
60 time = time + (diff_in - diff)
65 call endsub(subname,
'time=%c', &
77 use dc_string,
only: stoi
80 character(*),
intent(in):: zone
81 integer:: hour,
min, sgn
86 if (zone(1:1) ==
'-')
then
91 hour = stoi(zone(2:3))
106 character(*),
intent(in):: zone
110 if (len(zone) < 6)
return
111 if (verify(zone(1:1),
'+-') /= 0)
return
112 if (verify(zone(2:3),
'1234567890') /= 0)
return
113 if (verify(zone(5:6),
'1234567890') /= 0)
return
114 if (zone(4:4) /=
':')
return
type(dc_difftime) function dcdatetimezonetodiff(zone)
logical function dcdatetimevalidzone(zone)
subroutine dcdatetimesetzone(time, zone, err)
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
integer, parameter, public dc_ebadtimezone
Provides kind type parameter values.
integer, parameter, public string
Character length for string