Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 229 of 796  Not logged in ELOG logo
ID Date Icon Author Author Email Category OS ELOG Version Subjectup
  69310   Wed Feb 24 08:44:42 2021 Reply Martin Neumannelog.20.beazy@spamgourmet.comQuestionLinuxV3.1.4-80633baRe: Date conversion

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:

  69312   Tue Mar 2 15:17:56 2021 Reply Sebastian Schenksebastian.schenk@physik.uni-halle.deQuestionLinuxV3.1.4-80633baRe: 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:

 

  69316   Wed Mar 10 17:30:23 2021 Reply Stefan Rittdo stefan.ritt@psi.chQuestionLinuxV3.1.4-80633baRe: Date conversion

Do you actually need to convert the date into the internal format? Why not keeping simply the full string YYYY-MM-DD HH:MM. If the use is disciplined enough to always use the correct format, there should be no issue. I invented the datetime format to "force" all date/time inputs to have the correct format. If you have a proper YYYY-MM-DD HH:MM format, even sorting (now by string) should work correctly.

Martin Neumann wrote:

Hi,

I am trying to figure out how ELOG works and I have a problem.

I have one datetime attribute, where I want the user to be able to enter the time in ISO8601 format (YYYY-MM-DD HH:MM) instead of the buttons.

How do I manage that this input is converted correctly into the internal format?

I tried adding a hidden locked Attribute called IntDate and use "Subst IntDate = $start" but the result is dates in 1970, even though I have set the Time Format to "%F %H:%M"

 

  2001   Tue Oct 17 13:03:22 2006 Blink Ibrahim Gencig004@hotmail.comBug reportLinux | Windows2.6.2-1723Re: Date format in Threaded display

deletoille wrote:
hello,

Time format = %d/%m/%Y, %T

Thanks in advance


I think "date format" and "time format" are different tags.
you may try to use date format here.
  2002   Tue Oct 17 13:12:52 2006 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux | Windows2.6.2-1723Re: Date format in Threaded display
That fix for Steve Jones was slightly different, it had to do with substitutions in threaded display. I fixed yours now in revision 1734, so give it a try.

Salut,

Stefan
  2008   Thu Oct 19 12:26:16 2006 Entry deletoillexavier.deletoille@synchrotron-soleil.frBug reportLinux | Windows2.6.2-1723Re: Date format in Threaded display

Stefan Ritt wrote:
That fix for Steve Jones was slightly different, it had to do with substitutions in threaded display. I fixed yours now in revision 1734, so give it a try.

Salut,

Stefan


Hello,
I’ve tried on the last available release (revision 1732) and I have the same problem.
You said in you previous message that: “I fixed yours now in revision 1734, so give it a try.”
Could you tell me when this one will be available?

Thanks in advance
  2009   Thu Oct 19 12:32:11 2006 Reply Stefan Rittstefan.ritt@psi.chBug reportLinux | Windows2.6.2-1723Re: Date format in Threaded display

deletoille wrote:
I’ve tried on the last available release (revision 1732) and I have the same problem.
You said in you previous message that: “I fixed yours now in revision 1734, so give it a try.”
Could you tell me when this one will be available?


Since you checked "Linux" in the "OS" of this entry, I was under the assumption that you were able to compile elog from the Subversion repository (http://savannah.psi.ch/websvn/filedetails.php?repname=elog&path=%2Ftrunk%2Fsrc%2Felogd.c).

If you need the Windows executable, I made http://midas/elog/download/windows/elog262-6.exe for you.
  2010   Thu Oct 19 12:42:42 2006 Smile deletoillexavier.deletoille@synchrotron-soleil.frBug reportLinux | Windows2.6.2-1723Re: Date format in Threaded display

Stefan Ritt wrote:

deletoille wrote:
I’ve tried on the last available release (revision 1732) and I have the same problem.
You said in you previous message that: “I fixed yours now in revision 1734, so give it a try.”
Could you tell me when this one will be available?


Since you checked "Linux" in the "OS" of this entry, I was under the assumption that you were able to compile elog from the Subversion repository (http://savannah.psi.ch/websvn/filedetails.php?repname=elog&path=%2Ftrunk%2Fsrc%2Felogd.c).

If you need the Windows executable, I made http://midas/elog/download/windows/elog262-6.exe for you.


IT WORKS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
THANKS A LOT
ELOG V3.1.5-2eba886