Help! Python to compare dates in diff. timezones

Gerhard Häring gerhard.haering at gmx.de
Sun Jul 28 15:21:49 EDT 2002


* Sunit Joshi <sjoshi at ingr.com> [2002-07-28 09:17 -0700]:
> Hello All
> 
> I have problem which is like this: 
> I have two sites A & B which are in diff. countries in diff.
> timezones.
> Now both sites have same drawings (Microstation files with same names)
> whose revision dates (as integer since epoch) are stored in a table in
> database at both sites. The database structure is same on both sites
> with identical table names.

Is there some sort of replication taking place?

> Now since the sites are different timezones, I was wondering what
> would be the best way to compare drawings, using Python, that have
> changed between two sites; for e.g. if site A wants to gets a list of
> all models that have changed at site A.

Just normalize the dates to use GMT, so that you can compare them.

> I'm open to any suggestion like using a query over HTTP, using XML,
> etc.

It sounds easiest to just make both db servers accessible at sites A and
B and let that do somebody who knows their stuff about security (I'm not
saying you don't). Another transport layer like HTTP doesn't add any
value for database access, IMO.

Gerhard
-- 
This sig powered by Python!
Außentemperatur in München: 23.3 °C      Wind: 1.6 m/s




More information about the Python-list mailing list