Go to the source code of this file.
◆ dcdatetimesetzone()
subroutine dcdatetimesetzone |
( |
type(dc_datetime), intent(inout) |
time, |
|
|
character(*), intent(in) |
zone, |
|
|
logical, intent(out), optional |
err |
|
) |
| |
Definition at line 13 of file dcdatetimezone.f90.
References dc_trace::beginsub(), dc_error::dc_ebadtimezone, dc_error::dc_noerr, dc_trace::endsub(), dc_error::storeerror(), and dc_types::string.
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', &
integer, parameter, public dc_ebadtimezone
subroutine, public storeerror(number, where, err, cause_c, cause_i)
integer, parameter, public dc_noerr
subroutine, public beginsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca, version)
subroutine, public endsub(name, fmt, i, r, d, L, n, c1, c2, c3, ca)
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
◆ dcdatetimevalidzone()
logical function dcdatetimevalidzone |
( |
character(*), intent(in) |
zone | ) |
|
Definition at line 98 of file dcdatetimezone.f90.
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
◆ dcdatetimezonetodiff()
type(dc_difftime) function dcdatetimezonetodiff |
( |
character(*), intent(in) |
zone | ) |
|
Definition at line 70 of file dcdatetimezone.f90.
80 character(*),
intent(in):: zone
81 integer:: hour,
min, sgn
86 if (zone(1:1) ==
'-')
then 91 hour =
stoi(zone(2:3))