Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Date conversion, posted by Martin Neumann on Tue Feb 23 12:12:14 2021 
    icon2.gif   Re: Date conversion, posted by Andreas Luedeke on Tue Feb 23 17:20:39 2021 
       icon2.gif   Re: Date conversion, posted by Martin Neumann on Wed Feb 24 08:44:42 2021 
          icon2.gif   Re: Date conversion, posted by Sebastian Schenk on Tue Mar 2 15:17:56 2021 
    icon2.gif   Re: Date conversion, posted by Stefan Ritt on Wed Mar 10 17:30:23 2021 
Message ID: 69312     Entry time: Tue Mar 2 15:17:56 2021     In reply to: 69310
Icon: Reply  Author: Sebastian Schenk  Author Email: sebastian.schenk@physik.uni-halle.de 
Category: Question  OS: Linux  ELOG Version: V3.1.4-80633ba 
Subject: Re: Date conversion 

One other way would be to do the conversion on the client-side using javascript.
Overwrite the complete datetime input cell and add an event listener to either onChange of this input or the submit event, to trigger the conversion before submitting, so elog would get the converted time.

In out elog some entries get additional information added in this way.

Martin Neumann wrote:

I don't feel comfortable allowing the elog daemon to execute random shell scripts. Is there no other way?

Andreas Luedeke wrote:

If you define a field as "datetime" then you'll get the standard ELOG input field for datetime. It will be stored as seconds of the epoch (seconds since 1.1.1970).

You can define a field as a default string input, then it is stored as a string. But you can convert that string by a shell scripts into seconds of the epoch. See "subst" command in the documentation of the elog syntax:

 

ELOG V3.1.5-3fb85fa6