File tree 2 files changed +9
-9
lines changed
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 73
73
>>> u = DateTime(1125538824.0, format='unix')
74
74
>>> u.date
75
75
'2005:244:01:40:24.000'
76
- >>> mxd = mx.DateTime.Parser.DateTimeFromString('1999-01-01 12:13:14')
77
- >>> DateTime(mxd).fits
78
- '1999-01-01T12:14:18.184'
79
- >>> DateTime(mxd).date
80
- '1999:001:12:13:14.000'
81
- >>> DateTime(mxd).mxDateTime.strftime('%c')
82
- 'Fri Jan 1 12:13:14 1999'
83
76
>>> DateTime('2007122.01020340').date
84
77
'2007:122:01:02:03.400'
85
78
88
81
>>> DateTime().fits
89
82
'2009-11-14T18:24:14.504'
90
83
84
+ If the ``CXOTIME_NOW`` environment variable is set then it will be used as the current
85
+ time. This is useful for testing.
86
+
87
+ >>> import os
88
+ >>> os.environ['CXOTIME_NOW'] = '2020:001:00:00:00.000'
89
+ >>> DateTime().date
90
+ '2020:001:00:00:00.000'
91
+
91
92
For convenience a DateTime object can be initialized from another DateTime object.
92
93
93
94
>>> t = DateTime()
94
95
>>> u = DateTime(t)
95
96
96
-
97
97
Sequences of dates
98
98
------------------
99
99
Original file line number Diff line number Diff line change 67
67
#
68
68
# This is also used if you do content translation via gettext catalogs.
69
69
# Usually you set "language" from the command line for these cases.
70
- language = None
70
+ # language = None
71
71
72
72
# List of patterns, relative to source directory, that match files and
73
73
# directories to ignore when looking for source files.
You can’t perform that action at this time.
0 commit comments