tmp/tmpeufqptn7/{from.md → to.md}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
-
##
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
#define NULL see [support.types.nullptr]
|
| 5 |
#define CLOCKS_PER_SEC see below
|
| 6 |
#define TIME_UTC see below
|
|
@@ -25,12 +25,195 @@ namespace std {
|
|
| 25 |
size_t strftime(char* s, size_t maxsize, const char* format, const struct tm* timeptr);
|
| 26 |
}
|
| 27 |
```
|
| 28 |
|
| 29 |
The contents of the header `<ctime>` are the same as the C standard
|
| 30 |
-
library header `<time.h>`. [^
|
| 31 |
|
| 32 |
The functions `asctime`, `ctime`, `gmtime`, and `localtime` are not
|
| 33 |
-
required to avoid data races
|
| 34 |
|
| 35 |
-
ISO C
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
## Header `<ctime>` synopsis <a id="ctime.syn">[[ctime.syn]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
#define NULL see [support.types.nullptr]
|
| 5 |
#define CLOCKS_PER_SEC see below
|
| 6 |
#define TIME_UTC see below
|
|
|
|
| 25 |
size_t strftime(char* s, size_t maxsize, const char* format, const struct tm* timeptr);
|
| 26 |
}
|
| 27 |
```
|
| 28 |
|
| 29 |
The contents of the header `<ctime>` are the same as the C standard
|
| 30 |
+
library header `<time.h>`. [^1]
|
| 31 |
|
| 32 |
The functions `asctime`, `ctime`, `gmtime`, and `localtime` are not
|
| 33 |
+
required to avoid data races [[res.on.data.races]].
|
| 34 |
|
| 35 |
+
See also: ISO C 7.27
|
| 36 |
|
| 37 |
+
<!-- Link reference definitions -->
|
| 38 |
+
[basic.lookup.argdep]: basic.md#basic.lookup.argdep
|
| 39 |
+
[cpp17.equalitycomparable]: #cpp17.equalitycomparable
|
| 40 |
+
[cpp17.lessthancomparable]: #cpp17.lessthancomparable
|
| 41 |
+
[ctime.syn]: #ctime.syn
|
| 42 |
+
[filesystems]: input.md#filesystems
|
| 43 |
+
[format.formatter]: utilities.md#format.formatter
|
| 44 |
+
[format.string]: utilities.md#format.string
|
| 45 |
+
[formatter.requirements]: utilities.md#formatter.requirements
|
| 46 |
+
[intro.multithread]: basic.md#intro.multithread
|
| 47 |
+
[meta.rqmts]: utilities.md#meta.rqmts
|
| 48 |
+
[numeric.requirements]: numerics.md#numeric.requirements
|
| 49 |
+
[over.ics.rank]: over.md#over.ics.rank
|
| 50 |
+
[over.match.class.deduct]: over.md#over.match.class.deduct
|
| 51 |
+
[res.on.data.races]: library.md#res.on.data.races
|
| 52 |
+
[swappable.requirements]: library.md#swappable.requirements
|
| 53 |
+
[temp.deduct]: temp.md#temp.deduct
|
| 54 |
+
[time]: #time
|
| 55 |
+
[time.12]: #time.12
|
| 56 |
+
[time.cal]: #time.cal
|
| 57 |
+
[time.cal.day]: #time.cal.day
|
| 58 |
+
[time.cal.day.members]: #time.cal.day.members
|
| 59 |
+
[time.cal.day.nonmembers]: #time.cal.day.nonmembers
|
| 60 |
+
[time.cal.day.overview]: #time.cal.day.overview
|
| 61 |
+
[time.cal.general]: #time.cal.general
|
| 62 |
+
[time.cal.last]: #time.cal.last
|
| 63 |
+
[time.cal.md]: #time.cal.md
|
| 64 |
+
[time.cal.md.members]: #time.cal.md.members
|
| 65 |
+
[time.cal.md.nonmembers]: #time.cal.md.nonmembers
|
| 66 |
+
[time.cal.md.overview]: #time.cal.md.overview
|
| 67 |
+
[time.cal.mdlast]: #time.cal.mdlast
|
| 68 |
+
[time.cal.month]: #time.cal.month
|
| 69 |
+
[time.cal.month.members]: #time.cal.month.members
|
| 70 |
+
[time.cal.month.nonmembers]: #time.cal.month.nonmembers
|
| 71 |
+
[time.cal.month.overview]: #time.cal.month.overview
|
| 72 |
+
[time.cal.mwd]: #time.cal.mwd
|
| 73 |
+
[time.cal.mwd.members]: #time.cal.mwd.members
|
| 74 |
+
[time.cal.mwd.nonmembers]: #time.cal.mwd.nonmembers
|
| 75 |
+
[time.cal.mwd.overview]: #time.cal.mwd.overview
|
| 76 |
+
[time.cal.mwdlast]: #time.cal.mwdlast
|
| 77 |
+
[time.cal.mwdlast.members]: #time.cal.mwdlast.members
|
| 78 |
+
[time.cal.mwdlast.nonmembers]: #time.cal.mwdlast.nonmembers
|
| 79 |
+
[time.cal.mwdlast.overview]: #time.cal.mwdlast.overview
|
| 80 |
+
[time.cal.operators]: #time.cal.operators
|
| 81 |
+
[time.cal.wd]: #time.cal.wd
|
| 82 |
+
[time.cal.wd.members]: #time.cal.wd.members
|
| 83 |
+
[time.cal.wd.nonmembers]: #time.cal.wd.nonmembers
|
| 84 |
+
[time.cal.wd.overview]: #time.cal.wd.overview
|
| 85 |
+
[time.cal.wdidx]: #time.cal.wdidx
|
| 86 |
+
[time.cal.wdidx.members]: #time.cal.wdidx.members
|
| 87 |
+
[time.cal.wdidx.nonmembers]: #time.cal.wdidx.nonmembers
|
| 88 |
+
[time.cal.wdidx.overview]: #time.cal.wdidx.overview
|
| 89 |
+
[time.cal.wdlast]: #time.cal.wdlast
|
| 90 |
+
[time.cal.wdlast.members]: #time.cal.wdlast.members
|
| 91 |
+
[time.cal.wdlast.nonmembers]: #time.cal.wdlast.nonmembers
|
| 92 |
+
[time.cal.wdlast.overview]: #time.cal.wdlast.overview
|
| 93 |
+
[time.cal.year]: #time.cal.year
|
| 94 |
+
[time.cal.year.members]: #time.cal.year.members
|
| 95 |
+
[time.cal.year.nonmembers]: #time.cal.year.nonmembers
|
| 96 |
+
[time.cal.year.overview]: #time.cal.year.overview
|
| 97 |
+
[time.cal.ym]: #time.cal.ym
|
| 98 |
+
[time.cal.ym.members]: #time.cal.ym.members
|
| 99 |
+
[time.cal.ym.nonmembers]: #time.cal.ym.nonmembers
|
| 100 |
+
[time.cal.ym.overview]: #time.cal.ym.overview
|
| 101 |
+
[time.cal.ymd]: #time.cal.ymd
|
| 102 |
+
[time.cal.ymd.members]: #time.cal.ymd.members
|
| 103 |
+
[time.cal.ymd.nonmembers]: #time.cal.ymd.nonmembers
|
| 104 |
+
[time.cal.ymd.overview]: #time.cal.ymd.overview
|
| 105 |
+
[time.cal.ymdlast]: #time.cal.ymdlast
|
| 106 |
+
[time.cal.ymdlast.members]: #time.cal.ymdlast.members
|
| 107 |
+
[time.cal.ymdlast.nonmembers]: #time.cal.ymdlast.nonmembers
|
| 108 |
+
[time.cal.ymdlast.overview]: #time.cal.ymdlast.overview
|
| 109 |
+
[time.cal.ymwd]: #time.cal.ymwd
|
| 110 |
+
[time.cal.ymwd.members]: #time.cal.ymwd.members
|
| 111 |
+
[time.cal.ymwd.nonmembers]: #time.cal.ymwd.nonmembers
|
| 112 |
+
[time.cal.ymwd.overview]: #time.cal.ymwd.overview
|
| 113 |
+
[time.cal.ymwdlast]: #time.cal.ymwdlast
|
| 114 |
+
[time.cal.ymwdlast.members]: #time.cal.ymwdlast.members
|
| 115 |
+
[time.cal.ymwdlast.nonmembers]: #time.cal.ymwdlast.nonmembers
|
| 116 |
+
[time.cal.ymwdlast.overview]: #time.cal.ymwdlast.overview
|
| 117 |
+
[time.clock]: #time.clock
|
| 118 |
+
[time.clock.cast]: #time.clock.cast
|
| 119 |
+
[time.clock.cast.fn]: #time.clock.cast.fn
|
| 120 |
+
[time.clock.cast.id]: #time.clock.cast.id
|
| 121 |
+
[time.clock.cast.sys]: #time.clock.cast.sys
|
| 122 |
+
[time.clock.cast.sys.utc]: #time.clock.cast.sys.utc
|
| 123 |
+
[time.clock.cast.utc]: #time.clock.cast.utc
|
| 124 |
+
[time.clock.conv]: #time.clock.conv
|
| 125 |
+
[time.clock.file]: #time.clock.file
|
| 126 |
+
[time.clock.file.members]: #time.clock.file.members
|
| 127 |
+
[time.clock.file.nonmembers]: #time.clock.file.nonmembers
|
| 128 |
+
[time.clock.file.overview]: #time.clock.file.overview
|
| 129 |
+
[time.clock.gps]: #time.clock.gps
|
| 130 |
+
[time.clock.gps.members]: #time.clock.gps.members
|
| 131 |
+
[time.clock.gps.nonmembers]: #time.clock.gps.nonmembers
|
| 132 |
+
[time.clock.gps.overview]: #time.clock.gps.overview
|
| 133 |
+
[time.clock.hires]: #time.clock.hires
|
| 134 |
+
[time.clock.local]: #time.clock.local
|
| 135 |
+
[time.clock.req]: #time.clock.req
|
| 136 |
+
[time.clock.steady]: #time.clock.steady
|
| 137 |
+
[time.clock.system]: #time.clock.system
|
| 138 |
+
[time.clock.system.members]: #time.clock.system.members
|
| 139 |
+
[time.clock.system.nonmembers]: #time.clock.system.nonmembers
|
| 140 |
+
[time.clock.system.overview]: #time.clock.system.overview
|
| 141 |
+
[time.clock.tai]: #time.clock.tai
|
| 142 |
+
[time.clock.tai.members]: #time.clock.tai.members
|
| 143 |
+
[time.clock.tai.nonmembers]: #time.clock.tai.nonmembers
|
| 144 |
+
[time.clock.tai.overview]: #time.clock.tai.overview
|
| 145 |
+
[time.clock.utc]: #time.clock.utc
|
| 146 |
+
[time.clock.utc.members]: #time.clock.utc.members
|
| 147 |
+
[time.clock.utc.nonmembers]: #time.clock.utc.nonmembers
|
| 148 |
+
[time.clock.utc.overview]: #time.clock.utc.overview
|
| 149 |
+
[time.duration]: #time.duration
|
| 150 |
+
[time.duration.alg]: #time.duration.alg
|
| 151 |
+
[time.duration.arithmetic]: #time.duration.arithmetic
|
| 152 |
+
[time.duration.cast]: #time.duration.cast
|
| 153 |
+
[time.duration.comparisons]: #time.duration.comparisons
|
| 154 |
+
[time.duration.cons]: #time.duration.cons
|
| 155 |
+
[time.duration.io]: #time.duration.io
|
| 156 |
+
[time.duration.literals]: #time.duration.literals
|
| 157 |
+
[time.duration.nonmember]: #time.duration.nonmember
|
| 158 |
+
[time.duration.observer]: #time.duration.observer
|
| 159 |
+
[time.duration.special]: #time.duration.special
|
| 160 |
+
[time.format]: #time.format
|
| 161 |
+
[time.format.spec]: #time.format.spec
|
| 162 |
+
[time.general]: #time.general
|
| 163 |
+
[time.hms]: #time.hms
|
| 164 |
+
[time.hms.members]: #time.hms.members
|
| 165 |
+
[time.hms.nonmembers]: #time.hms.nonmembers
|
| 166 |
+
[time.hms.overview]: #time.hms.overview
|
| 167 |
+
[time.hms.width]: #time.hms.width
|
| 168 |
+
[time.parse]: #time.parse
|
| 169 |
+
[time.parse.spec]: #time.parse.spec
|
| 170 |
+
[time.point]: #time.point
|
| 171 |
+
[time.point.arithmetic]: #time.point.arithmetic
|
| 172 |
+
[time.point.cast]: #time.point.cast
|
| 173 |
+
[time.point.comparisons]: #time.point.comparisons
|
| 174 |
+
[time.point.cons]: #time.point.cons
|
| 175 |
+
[time.point.nonmember]: #time.point.nonmember
|
| 176 |
+
[time.point.observer]: #time.point.observer
|
| 177 |
+
[time.point.special]: #time.point.special
|
| 178 |
+
[time.summary]: #time.summary
|
| 179 |
+
[time.syn]: #time.syn
|
| 180 |
+
[time.traits]: #time.traits
|
| 181 |
+
[time.traits.duration.values]: #time.traits.duration.values
|
| 182 |
+
[time.traits.is.clock]: #time.traits.is.clock
|
| 183 |
+
[time.traits.is.fp]: #time.traits.is.fp
|
| 184 |
+
[time.traits.specializations]: #time.traits.specializations
|
| 185 |
+
[time.zone]: #time.zone
|
| 186 |
+
[time.zone.db]: #time.zone.db
|
| 187 |
+
[time.zone.db.access]: #time.zone.db.access
|
| 188 |
+
[time.zone.db.list]: #time.zone.db.list
|
| 189 |
+
[time.zone.db.remote]: #time.zone.db.remote
|
| 190 |
+
[time.zone.db.tzdb]: #time.zone.db.tzdb
|
| 191 |
+
[time.zone.exception]: #time.zone.exception
|
| 192 |
+
[time.zone.exception.ambig]: #time.zone.exception.ambig
|
| 193 |
+
[time.zone.exception.nonexist]: #time.zone.exception.nonexist
|
| 194 |
+
[time.zone.general]: #time.zone.general
|
| 195 |
+
[time.zone.info]: #time.zone.info
|
| 196 |
+
[time.zone.info.local]: #time.zone.info.local
|
| 197 |
+
[time.zone.info.sys]: #time.zone.info.sys
|
| 198 |
+
[time.zone.leap]: #time.zone.leap
|
| 199 |
+
[time.zone.leap.members]: #time.zone.leap.members
|
| 200 |
+
[time.zone.leap.nonmembers]: #time.zone.leap.nonmembers
|
| 201 |
+
[time.zone.leap.overview]: #time.zone.leap.overview
|
| 202 |
+
[time.zone.link]: #time.zone.link
|
| 203 |
+
[time.zone.link.members]: #time.zone.link.members
|
| 204 |
+
[time.zone.link.nonmembers]: #time.zone.link.nonmembers
|
| 205 |
+
[time.zone.link.overview]: #time.zone.link.overview
|
| 206 |
+
[time.zone.members]: #time.zone.members
|
| 207 |
+
[time.zone.nonmembers]: #time.zone.nonmembers
|
| 208 |
+
[time.zone.overview]: #time.zone.overview
|
| 209 |
+
[time.zone.timezone]: #time.zone.timezone
|
| 210 |
+
[time.zone.zonedtime]: #time.zone.zonedtime
|
| 211 |
+
[time.zone.zonedtime.ctor]: #time.zone.zonedtime.ctor
|
| 212 |
+
[time.zone.zonedtime.members]: #time.zone.zonedtime.members
|
| 213 |
+
[time.zone.zonedtime.nonmembers]: #time.zone.zonedtime.nonmembers
|
| 214 |
+
[time.zone.zonedtime.overview]: #time.zone.zonedtime.overview
|
| 215 |
+
[time.zone.zonedtraits]: #time.zone.zonedtraits
|
| 216 |
+
|
| 217 |
+
[^1]: `strftime` supports the C conversion specifiers `C`, `D`, `e`,
|
| 218 |
+
`F`, `g`, `G`, `h`, `r`, `R`, `t`, `T`, `u`, `V`, and `z`, and the
|
| 219 |
+
modifiers `E` and `O`.
|