File tree Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Expand file tree Collapse file tree 3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ before_install:
16
16
script :
17
17
- julia -e "Pkg.init()"
18
18
- julia -e 'Pkg.add("BinDeps")'
19
- - julia -e 'Pkg.add("Calendar ")'
19
+ - julia -e 'Pkg.add("Dates ")'
20
20
- julia -e 'Pkg.add("HttpParser")'
21
21
- julia -e 'Pkg.add("FactCheck")'
22
22
- mkdir -p ~/.julia/HttpCommon
Original file line number Diff line number Diff line change 1
1
julia 0.2-
2
- Calendar
2
+ Dates
3
3
FactCheck 0.1.0-
Original file line number Diff line number Diff line change 1
1
module HttpCommon
2
2
3
- using Calendar
3
+ using Dates
4
4
5
5
export STATUS_CODES,
6
6
GET,
@@ -113,20 +113,15 @@ const HttpMethodNameToBitmask = (String => HttpMethodBitmask)[
113
113
114
114
const HttpMethodBitmaskToName = (HttpMethodBitmask => String)[v => k for (k, v) in HttpMethodNameToBitmask]
115
115
116
- # Default HTTP headers
117
- # RFC 1123 datetime formatting constants
118
- RFC1123_FORMAT_STR = " EEE, dd MMM yyyy HH:mm:ss"
119
-
120
116
# Get RFC 1123 datetimes
121
117
#
122
118
# RFC1123_datetime( now() ) => "Wed, 27 Mar 2013 08:26:04 GMT"
123
119
# RFC1123_datetime() => "Wed, 27 Mar 2013 08:26:04 GMT"
124
120
#
125
- RFC1123_datetime (t:: CalendarTime ) = begin
126
- t = tz (t," GMT" )
127
- format (RFC1123_FORMAT_STR, t) * " GMT"
121
+ RFC1123_datetime (t:: DateTime ) = begin
122
+ Dates. format (t, Dates. RFC1123Format) * " GMT"
128
123
end
129
- RFC1123_datetime () = RFC1123_datetime (now ())
124
+ RFC1123_datetime () = RFC1123_datetime (Dates . nowutc ())
130
125
131
126
# HTTP Headers
132
127
#
You can’t perform that action at this time.
0 commit comments