<p>Thank you for the observation. You are correct, command:<br>
<code>$ date --date='Wed 31 Jul 2019 09:02:40 AM UTC' +'%s'</code><br>
is doing exactly the 'rpm task' (described in my previous comment).</p>
<p>I tried to test this functionality using some short-cuts. With the results:</p>
<ul>
<li>
<p>command <code>date</code> recognizes the short-cut and do the task correctly for some timezones e.g. A, AKDT, ...</p>
</li>
<li>
<p>command <code>date</code> does not recognize the short-cut and writes an error. E. g. ACST, ACT, ...</p>
</li>
<li>
<p>one short-cut denotes two (or more) timezones. E.g GST can be short-cut for even four time zones [2]. Command <code>date</code> chooses one of them and computes the time for the chosen time zone. Similarly for ADT and AST, ....</p>
</li>
</ul>
<p>A little bit of statistics. I tested  time zone short-cuts with names starting by A-E (using [1]). The number of time zones was 70. The mentioned version of <code>date</code> command correctly resolved 14 of them, <code>date</code> did not recognise 51 of them and  5 were resolved as one of more possible time zones. So this approach is not much reliable for us.</p>
<p>Moreover, I checked the underlying source code for resolving of the mentioned version of <code>date</code> commands. It uses 3 data structures (<code>time_zone_table</code>, <code>universal_time_zone_table</code>, <code>military_table</code>) contained in <code>lib/parse-datetime.c</code>. Comment before the most interesting of the tables (<code>time_zone_table</code>) says:</p>
<pre><code>/* The time zone table.  This table is necessarily incomplete, as time
zone abbreviations are ambiguous; e.g. Australians interpret "EST"
as Eastern time in Australia, not as US Eastern Standard Time.
You cannot rely on parse_datetime to handle arbitrary time zone
abbreviations; use numeric abbreviations like "-0500" instead.  */
</code></pre>
<p>Thus I think that this solution is not suitable to be used in rpm.</p>
<p>[1] <a href="https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations" rel="nofollow">https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations</a><br>
[2] <a href="https://www.worldtimezone.com/wtz-names/wtz-gst.html" rel="nofollow">https://www.worldtimezone.com/wtz-names/wtz-gst.html</a></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/739?email_source=notifications&email_token=ADLPZU7CGIOCY35HGD6W7ITQCPEBDA5CNFSM4HTUSY7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3MWAYI#issuecomment-517562465">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ADLPZUY74BFK63JX42ZJGPTQCPEBDANCNFSM4HTUSY7A">mute the thread</a>.<img src="https://github.com/notifications/beacon/ADLPZU6FIM23422GGXKOOALQCPEBDA5CNFSM4HTUSY7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3MWAYI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/rpm-software-management/rpm/pull/739?email_source=notifications\u0026email_token=ADLPZU7CGIOCY35HGD6W7ITQCPEBDA5CNFSM4HTUSY7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3MWAYI#issuecomment-517562465",
"url": "https://github.com/rpm-software-management/rpm/pull/739?email_source=notifications\u0026email_token=ADLPZU7CGIOCY35HGD6W7ITQCPEBDA5CNFSM4HTUSY7KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3MWAYI#issuecomment-517562465",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>