octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45659] version function: options and return v


From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #45659] version function: options and return values supported by Matlab
Date: Sun, 10 Apr 2016 09:37:34 +0000
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #22, bug #45659 (project octave):

The last patch did not work because I forgot to include my local changes to
the build-info.h header. This version should compile.
It also adds the new field "build_unixtime" to the ___octave_config_info____
structure.

I left the build_time and build_date fields in because they are in a more user
readable form. However, they will be a little bit off depending on how fast
the system is for compilation. I am OK with removing them if you deem it
better.

To get a more user readable date string from the unix time, you can use the
following line of code:

>> datestr (__octave_config_info__.build_unixtime/60/60/24 + datenum
("01-Jan-1970"))
ans = 10-Apr-2016 09:05:55

Please, observe that this is UTC+0 independent on your local time zone. The
same holds for build_date and build_time (at least when compiling with gcc).

Maybe it would make sence to add small helper functions to convert between
unix time and Matlab time (if not already there) when removing build_date and
build_time. These could maybe also contain optional conversion to local
timezone. But maybe better keep this out of this bug...

(file #36887)
    _______________________________________________________

Additional Item Attachment:

File name: version_2_v3.patch             Size:5 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45659>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]