don't you have to delete the 'dateTime' in blue in the drop down list shown 
and enter Tom's formatting command as the format for the dateTime field.



On Friday, 29 March 2019 17:24:48 UTC+2, V. Kelly Bellis wrote:
>
> Thanks for all of the helpful replies.
>
> Tom, I tried as you suggested; i.e., 1) after double-clicking on the file 
> from and the file manager (aka LXPanel 0.9.3), and 2) from the terminal 
> using:
> pi@raspberrypi:~ $ sudo sqlitebrowser /var/lib/weewx.sdb
>
> In both instances and regardless of whether or not weewx daemon was 
> running, I was unable to edit the value.
>
> [image: 2019-03-29-112002_1360x768_scrot.png]
>
>
> Maybe this is part of the reason you're not abig fan? What other db 
> drowser for the RPi might you suggest that includes the feature to edit 
> display formats?
>
>
>
> On Friday, March 29, 2019 at 10:50:00 AM UTC-4, Thomas Keffer wrote:
>>
>> I am not a big fan of DBBrowser for sqlite, but one nice feature it has 
>> is the ability to apply display formats to columns. Just right click on the 
>> dateTime column, select "Edit display format", and type in the following:
>>
>>
>> *datetime(`dateTime`, 'unixepoch', 'localtime')*
>>
>> Now the column will be displayed in local time.
>>
>> -tk
>>
>> On Fri, Mar 29, 2019 at 7:32 AM Greg Troxel <[email protected]> wrote:
>>
>>> "V. Kelly Bellis" <[email protected]> writes:
>>>
>>> > Before seeing your kind reply, I was dividing the whole mess by 60, 
>>> then 
>>> > 60, then 24, then 365.2422 and figured we were looking at 19700101 
>>> > 00:00:00; however, I still don't understand the deliberate obfuscation 
>>> for 
>>> > any human reading the weewx.sdb
>>>
>>> It is not obfuscation.  It is the standard representation of time as
>>> defined by the POSIX specification.  Databases are for machine
>>> processing, and programs that display data from databases for humans
>>> should format/transform appropriately.
>>>
>>> You are running into the difference between "human readable" and "nerd
>>> readable" :-)
>>>
>>> On the command line, "date +%s" will show the current time as a POSIX
>>> time_t, and "date -r N" will show the human-readable date/time at time_t
>>> value N.
>>>
>>> Very likely you can put some sort of conversion function into a sql
>>> select statement when grabbing time and whatever for inspection.  But
>>> beware of zones and DST.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to