25 &
operator(-),
operator(+)
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 49 &
'zone=<%c> is invalid.', &
56 call eval(time, zone = zone_in)
60 time = time + (diff_in - diff)
65 call endsub(subname,
'time=%c', &
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
integer, parameter, public dc_ebadtimezone
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
subroutine dcdatetimesetzone(time, zone, err)
logical function dcdatetimevalidzone(zone)
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
type(dc_difftime) function dcdatetimezonetodiff(zone)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ