You don't choose to explain your issue very clear, but I get the impression that your problem is that the you get an access denied due to a time expired even though the expires time is less than the server time.
If that is the case your only option is to make sure you get the full time format, such as
YYYY-MM-DDThh:mm:ss.sTZD
YYYY = four-digit year
MM = two-digit month (01=January, etc.)
DD = two-digit day of month (01 through 31)
hh = two digits of hour (00 through 23) (am/pm NOT allowed)
mm = two digits of minute (00 through 59)
ss = two digits of second (00 through 59)
s = one or more digits representing a decimal fraction of a second
TZD = time zone designator (Z or +hh:mm or -hh:mm)
See
http://www.w3.org/TR/NOTE-datetime[
^]
The time zone designator is the key.