Menu

#102 gscan2pdf always set the time to 0 UTC

closed
nobody
None
5
2019-01-07
2018-04-21
No

The timestamp for the PDF metadata, for files created by gscan2pdf, as given by pdfinfo, is always set to 5.30 am. Since India is UTC + 5.30, that presumably means that the actual setting is 0 UTC (that's just a guess). Here is what it looks like for a file I scanned today

CreationDate:   Sat Apr 21 05:30:00 2018 IST

Obviously I'd prefer to have gscan2pdf set the actual time of creation as the timestamp of the metadata in the PDF.

For the record, your response to this was as follows:

Hi Faheem Mitha,

Currently, the timestamp of the metadata in the PDF (as reported by
pdfinfo) is set by the metadata date used whilst saving. As the metadata
in the save dialogue has no time component, this is set to 0 UTC.

If the preference "Set access and modification times to metadata date"
is active, then the file timestamp will also be set to the same date and
time.

The fact that you think that information is being lost suggests to me
that you would like to specify at least the time zone if not also the
time itself.

I suppose this would involve an extra preferences for the city of the
time zone (defaulting to the locale) and a switch widget for whether to
specify the time, plus then the time itself (defaulting to now) on the
scan dialogue.

If this is the case, would you mind filing a wishlist bug?

Regards

Jeff

Discussion

  • Juan Miguel Ruiz Martínez

    It's similar for Spain. The access and modification times are setting to 02:00:00 CEST which is the UTC mark for peninsular Spanish time, but for example, just now are 18:03 and if I create a PDF with gscan2pdf the access and modification times are however setting to 02:00:00 CEST.

     
  • Jeffrey Ratcliffe

    The option "Use timezone from locale" was added in v2.1.3. Does this not solve the problem for you?

     
    • Juan Miguel Ruiz Martínez

      Yes this option ("Use timezone from locale") is valid for the operating system timestamps, but no for the pdf attributes, those are still inexact.

       
  • Jeffrey Ratcliffe

    • status: open --> closed
     
  • Faheem Mitha

    Faheem Mitha - 2018-10-27

    I concur. This option (which I also have set), does not solve the issue, at least for pdfinto / PDF metadata. I currently get output like

    CreationDate: Sat Oct 27 00:00:00 2018 IST
    ModDate: Sat Oct 27 00:00:00 2018 IST

    The timestamps listed by ls, however, it now correct, at least approximately. I haven't done careful checks. Were these also incorrect before?

     
  • Jeffrey Ratcliffe

    Apologies for the late reply. For me, pdfinfo output like

    CreationDate: Sat Oct 27 00:00:00 2018 IST
    

    seems correct. If you also want to include the time, tick the "Specify time as well as date" in Edit/Preferences/General Options.

    Perhaps the option is poorly named. Would "Specify time as well as date in metadata" be clearer?

     
  • Faheem Mitha

    Faheem Mitha - 2018-12-24

    I set the "Specify time as well as date", which I don't recall hearing about before. But it makes no difference. The time still shows up in pdfinfo as (in my current example)

    CreationDate:   Tue Dec 25 00:00:00 2018 IST
    ModDate:        Tue Dec 25 00:00:00 2018 IST
    

    Currently running 2.2.1. Should I post a log?

     
  • Jeffrey Ratcliffe

    No. I can reproduce this too - although the timezone is OK, the time is not.

    I'll have another go at fixing this.

     
  • Jeffrey Ratcliffe

    The time really does make it into the metadata in the next release (v2.2.3)

     

Log in to post a comment.