EldoS | Feel safer!

Software components for data protection, secure storage and transfer

pdf sign - time ? GMT

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#12937
Posted: 04/06/2010 08:34:09
by Kvetoslav Jansta (Standard support level)
Joined: 05/06/2008
Posts: 56

Hello,

our local time is just now +2 hour of GMT. Now : 15:19:47
When I sign the pdf, using Sig.SigningTime := LocalTimeToUTCTime(Now);

the result is in the PDF file:
Time : 2010.04.06 13:19:47 Z
GMT : 2010.04.06 13:19:47 Z

The question is, what is the firt line Time ?
Should not be the local time of my timezone ?
and the second line GMT, as is shown ?

thank you, slava jansta
#12942
Posted: 04/06/2010 11:16:10
by Ken Ivanov (EldoS Corp.)

Thank you for contacting us.

PDFBlackbox expects all the time values to be passed in UTC. To make it expect them in local time zone, please add the aoAdjustTimesToUTC flag to TElPDFDocument.AssemblyOptions flag set and remove the LocalTimeToUTCTime() envelope.
#12944
Posted: 04/07/2010 02:31:31
by Kvetoslav Jansta (Standard support level)
Joined: 05/06/2008
Posts: 56

Quote
Innokentiy Ivanov wrote:
add the aoAdjustTimesToUTC


óooo, magical flag :)

Nice. thank you, slava
#14406
Posted: 09/08/2010 03:22:18
by mitja lojk (Basic support level)
Joined: 08/26/2010
Posts: 6

Hello!

I am signing an xml document with TElXMLSigner (xades), and I have a problem with SigningTime. When I sign the document, the SigningTime format is :

Quote
<xds:SigningTime>2010-09-08T07:46:38.847Z</xds:SigningTime>


But the format that I need is :

Quote
<xds:SigningTime>2010-09-07T09:47:50.8010835+02:00</xds:SigningTime>


How can it be done ?

BDW my code for setting signing time is :
Quote

...
XAdESSigner.SigningTime := LocalTimeToUTCTime(Now);
...
#14413
Posted: 09/08/2010 12:10:24
by Dmytro Bogatskyy (EldoS Corp.)

Quote
<xds:SigningTime>2010-09-07T09:47:50.8010835+02:00</xds:SigningTime>
How can it be done ?

The problem is in timezone or fraction of a second accuracy?
You can set SigningTime manually to any string (see http://www.eldos.com/documentation/sb...rties.html ), for example:
Code
...
XAdESSigner.Generate();
...
XAdESSigner.QualifyingProperties.SignedProperties.SignedSignatureProperties.SignedTime := SBXMLUtils.DateTimeToXMLString(Now, xdfFullDateTime, 120); // to change timezone (2 hours = 120 minutes)
...
#14444
Posted: 09/13/2010 04:15:13
by mitja lojk (Basic support level)
Joined: 08/26/2010
Posts: 6

Ok thanks!

But I an using SB 7 and i don't have SBXMLUtils.

Quote

Version 8.0.172. Beta version

(XML) Common functions have been moved from SBXMLSec to SBXMLUtils



I've checked SBXMLSec for DateTimeToXMLString but it is not there.
How can it be done using SB 7 ?
#14445
Posted: 09/13/2010 04:26:49
by Dmytro Bogatskyy (EldoS Corp.)

Quote
I've checked SBXMLSec for DateTimeToXMLString but it is not there.
How can it be done using SB 7 ?

As far as I remember, DateTimeToXMLString was in SBXMLAdES unit, but it accept only one parameter UTC datetime. It was improved in version 8.
Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.

Reply

Statistics

Topic viewed 1321 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!