Skip to content

Commit 4fef994

Browse files
committed
Update docs
1 parent 9f600ac commit 4fef994

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

chandra_time/Time.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@
7373
>>> u = DateTime(1125538824.0, format='unix')
7474
>>> u.date
7575
'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'
8376
>>> DateTime('2007122.01020340').date
8477
'2007:122:01:02:03.400'
8578
@@ -88,12 +81,19 @@
8881
>>> DateTime().fits
8982
'2009-11-14T18:24:14.504'
9083
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+
9192
For convenience a DateTime object can be initialized from another DateTime object.
9293
9394
>>> t = DateTime()
9495
>>> u = DateTime(t)
9596
96-
9797
Sequences of dates
9898
------------------
9999

docs/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
#
6868
# This is also used if you do content translation via gettext catalogs.
6969
# Usually you set "language" from the command line for these cases.
70-
language = None
70+
# language = None
7171

7272
# List of patterns, relative to source directory, that match files and
7373
# directories to ignore when looking for source files.

0 commit comments

Comments
 (0)