diff --git a/TODO.txt b/TODO.txt index 70f76008..f31cc987 100644 --- a/TODO.txt +++ b/TODO.txt @@ -1,6 +1,6 @@ TODO before the next release: -Improve the documentation on writing a custom search list. +Offer a way to change the horizon for the almanac. Calculate altimeter pressure to send off to CWOP. See http://davisnet.com/product_documents/weather/app_notes/AN_28-derived-weather-variables.pdf diff --git a/bin/weeutil/weeutil.py b/bin/weeutil/weeutil.py index 73a57f9e..f654fd0e 100644 --- a/bin/weeutil/weeutil.py +++ b/bin/weeutil/weeutil.py @@ -578,12 +578,28 @@ def timestamp_to_string(ts): >>> print timestamp_to_string(1196705700) 2007-12-03 10:15:00 PST (1196705700) + >>> print timestamp_to_string(None) + ******* N/A ******* ( N/A ) """ if ts: return "%s (%d)" % (time.strftime("%Y-%m-%d %H:%M:%S %Z", time.localtime(ts)), ts) else: - return "****** N/A ******** ( N/A )" + return "******* N/A ******* ( N/A )" +def timestamp_to_gmtime(ts): + """Return a string formatted for GMT + + >>> print timestamp_to_gmtime(1196705700) + 2007-12-03 18:15:00 UTC (1196705700) + >>> print timestamp_to_gmtime(None) + ******* N/A ******* ( N/A ) + """ + if ts: + return "%s (%d)" % (time.strftime("%Y-%m-%d %H:%M:%S UTC", time.gmtime(ts)), ts) + else: + return "******* N/A ******* ( N/A )" + + def utcdatetime_to_timestamp(dt): """Convert from a datetime object holding a UTC time, to a unix timestamp. diff --git a/bin/weewx/__init__.py b/bin/weewx/__init__.py index 9c68914a..12577b8e 100644 --- a/bin/weewx/__init__.py +++ b/bin/weewx/__init__.py @@ -12,7 +12,7 @@ """ import time -__version__="2.0.0b13" +__version__="2.0.0b14" # Holds the program launch time in unix epoch seconds: # Useful for calculating 'uptime.' diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index e2dbdd0d..35cc8220 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -37,6 +37,8 @@ along the way. See the Customizing Guide. You can now use "mmHg" as a unit of pressure. +Added new almanac information such as first and last quarter moons. + Changed the engine architecture so it is more event driven. It now uses callbacks, making it easier to add new event types. diff --git a/docs/customizing.htm b/docs/customizing.htm index 273d38ac..48e2c333 100644 --- a/docs/customizing.htm +++ b/docs/customizing.htm @@ -16,10 +16,6 @@ @@ -856,7 +852,7 @@ Next summer, winter solstice: 21-Jun-2011 10:16 21-Dec-2011 21:29 Sunrise, sunset: 06:51 19:30
Here's a table of available extended almanac information:
-| previous_equinox | next_equinox | @@ -1931,7 +1927,7 @@ class MyAlarm(StdService): ... ('electricity', 'REAL'), ('inTempBatteryStatus', 'REAL')] -