|
From: Robert M. <rob...@gm...> - 2011-11-07 10:46:23
|
Hi, Currently the SOAP API returns dates ( creation, last modification, comment dates ) in the repository's local time zone, e.g. <last_updated xsi:type="xsd:dateTime">2011-09-23T07:29:18Z</last_updated> This is inconvenient because the client needs to know beforehand the timezone of the Mantis installation, which is not available using the SOAP API. There are multiple possibilities here: - add a new SOAP API call which would return the timezone of the Mantis repository - send all dates as GMT I prefer sending dates as GMT, as this is the least ambiguous and sidesteps around thorny issues such as DST with dates jumping back and forth. But before implementing I'd like to hear others' opinions, if any. Thanks, Robert -- Sent from my (old) computer |
|
From: Damien R. <dam...@me...> - 2011-11-07 14:45:26
|
On 07/11/11 11:46, Robert Munteanu wrote: > I prefer sending dates as GMT, as this is the least ambiguous and > sidesteps around thorny issues such as DST with dates jumping back and > forth. From my experience, it's always best to stick with UTC for dates, this way as you rightly pointed out, it's never ambiguous. Any timezone conversions happen on the client/user side as appropriate. Just my 2 cents. Damien |
|
From: Victor B. <vb...@gm...> - 2011-11-08 06:39:22
|
I would suggest the following: 1. Change MantisBT to use UTC internally and provide a migration step to migrate existing data. 2. Add support for per user timezone. All timestamps are to be displayed in the user's time zone. 3. SOAP API can return timezones in... a. UTC, but also provide an API to get the user's timezone as part of the user info. b. user's time zone of the logged in user. We can potentially do 3 before 1 and 2. The easiest approach for the clients is 3b since it provides the appropriate behavior by default, but also makes it possible to use a user with timezone UTC. On Mon, Nov 7, 2011 at 4:47 AM, Damien Regad <dam...@me...>wrote: > > On 07/11/11 11:46, Robert Munteanu wrote: > > I prefer sending dates as GMT, as this is the least ambiguous and > > sidesteps around thorny issues such as DST with dates jumping back and > > forth. > > From my experience, it's always best to stick with UTC for dates, this > way as you rightly pointed out, it's never ambiguous. Any timezone > conversions happen on the client/user side as appropriate. > > Just my 2 cents. > Damien > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Mantisbt-soap-dev mailing list > Man...@li... > https://lists.sourceforge.net/lists/listinfo/mantisbt-soap-dev > |
|
From: Robert M. <rob...@gm...> - 2011-11-08 10:09:49
|
Damien, Victor, Thanks for your comments. I will go through with 3b as outlined by Victor below , see 13496: Send all dates in the GMT timezone http://www.mantisbt.org/bugs/view.php?id=13496 I have added a comment to 13445: mc_user_get() to get user data http://www.mantisbt.org/bugs/view.php?id=13445 regarding the timezone information so that we implement it when we implement mc_user_get . I believe that 1 be done independently of this change, possibly as a cleanup effort. And I was under the impression that we already had per-user timezone information in 1.2.x . Thanks, Robert On Tue, Nov 8, 2011 at 8:39 AM, Victor Boctor <vb...@gm...> wrote: > > On Mon, Nov 7, 2011 at 4:47 AM, Damien Regad <dam...@me...> > wrote: >> >> On 07/11/11 11:46, Robert Munteanu wrote: >> > I prefer sending dates as GMT, as this is the least ambiguous and >> > sidesteps around thorny issues such as DST with dates jumping back and >> > forth. >> >> From my experience, it's always best to stick with UTC for dates, this >> way as you rightly pointed out, it's never ambiguous. Any timezone >> conversions happen on the client/user side as appropriate. >> >> Just my 2 cents. >> Damien >> >> >> >> ------------------------------------------------------------------------------ >> RSA(R) Conference 2012 >> Save $700 by Nov 18 >> Register now >> http://p.sf.net/sfu/rsa-sfdev2dev1 >> _______________________________________________ >> Mantisbt-soap-dev mailing list >> Man...@li... >> https://lists.sourceforge.net/lists/listinfo/mantisbt-soap-dev > > -- Sent from my (old) computer |
|
From: Robert M. <rob...@gm...> - 2011-11-09 12:51:08
|
On Tue, Nov 8, 2011 at 10:50 PM, Paul Richards <pa...@ma...> wrote: > David/Rob: your both slightly wrong here from what I recall of what I > originally implemented, and what then happened in trunk [dhx: remember your > fixes to redhat crapiness] > I personally feel this is probably something we should ensure is fixed for > the next major release of mantis as opposed trying to "bugfix" in now. > > To put another way, it would be nice to look at getting a 1.3/2.0/name > 'alpha' out around December/January time - as the focus to this would seem > to be a mixture of work to DB Api, Objects, Exceptions, Templating, New > webservice api as 'ideas/work in progress', now is probably not a good time > to do patches to adodb/mantis to change how we store timestamps. Here's my simple test: 1. On a bugtracker instance, running in Europe/Bucharest time mode, I have the following data in the database mysql> select date_submitted, from_unixtime(date_submitted) from mantis_bug_table where id = 4; +----------------+-------------------------------+ | date_submitted | from_unixtime(date_submitted) | +----------------+-------------------------------+ | 1300003755 | 2011-03-13 10:09:15 | +----------------+-------------------------------+ 2. I have set my Mantis user's time zone to Europe/Bucharest 3. I have viewed the bug in the web interface The creation date shown is 2011-03-13 10:09 Therefore the database will store the times in the local time zone, and not in UTC . When the next major release is available, I will be happy to update the SOAP API to be in line with the core APIs . Until then, I will adjust the SOAP API to remove this offset and send times in GMT. Thanks, Robert > > Paul > On Tue, Nov 8, 2011 at 1:15 PM, David Hicks <d...@hx...> wrote: >> >> On Tue, 2011-11-08 at 15:07 +0200, Robert Munteanu wrote: >> > Are you sure that the time in the database is set in UTC? If that's >> > true, I'm trying to solve a problem which does not exist. >> >> Perhaps not in every case. I only checked the function in bug_api that >> is called to insert a new issue into the database - and I only checked >> against the submission timestamp field. >> >> The SOAP API or other parts of MantisBT may feed in something other than >> db_now() or time() for timestamps. It might be worth grepping the source >> code for SQL statements that refer to timestamp columns and working >> backwards to ensure that db_now() or time() is being used to provide the >> value. >> >> >> ------------------------------------------------------------------------------ >> RSA(R) Conference 2012 >> Save $700 by Nov 18 >> Register now >> http://p.sf.net/sfu/rsa-sfdev2dev1 >> _______________________________________________ >> mantisbt-dev mailing list >> man...@li... >> https://lists.sourceforge.net/lists/listinfo/mantisbt-dev >> > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > mantisbt-dev mailing list > man...@li... > https://lists.sourceforge.net/lists/listinfo/mantisbt-dev > > -- Sent from my (old) computer |
|
From: Robert M. <rob...@gm...> - 2011-11-09 13:23:09
|
Actually, you're right. Somehow MySQL nicely converted this for me into the local timezone. So the data is stored internally as UTC , and the conversion to the local time zone is (incorrectly) done at a higher level, probably by NuSOAP. . On Wed, Nov 9, 2011 at 3:04 PM, Paul Richards <pa...@ma...> wrote: > Unless i'm going mad... > 1300003755 is Sun Mar 13 08:09:15 2011 ? > Bucharest is GMT/UTC+2hours [without DST] hence your 10am? > Paul > > On Wed, Nov 9, 2011 at 12:50 PM, Robert Munteanu <rob...@gm...> > wrote: >> >> On Tue, Nov 8, 2011 at 10:50 PM, Paul Richards <pa...@ma...> >> wrote: >> > David/Rob: your both slightly wrong here from what I recall of what I >> > originally implemented, and what then happened in trunk [dhx: >> > remember your >> > fixes to redhat crapiness] >> > I personally feel this is probably something we should ensure is fixed >> > for >> > the next major release of mantis as opposed trying to "bugfix" in now. >> > >> > To put another way, it would be nice to look at getting a 1.3/2.0/name >> > 'alpha' out around December/January time - as the focus to this would >> > seem >> > to be a mixture of work to DB Api, Objects, Exceptions, Templating, New >> > webservice api as 'ideas/work in progress', now is probably not a good >> > time >> > to do patches to adodb/mantis to change how we store timestamps. >> >> Here's my simple test: >> >> 1. On a bugtracker instance, running in Europe/Bucharest time mode, I >> have the following data in the database >> >> mysql> select date_submitted, from_unixtime(date_submitted) from >> mantis_bug_table where id = 4; >> +----------------+-------------------------------+ >> | date_submitted | from_unixtime(date_submitted) | >> +----------------+-------------------------------+ >> | 1300003755 | 2011-03-13 10:09:15 | >> +----------------+-------------------------------+ >> >> >> 2. I have set my Mantis user's time zone to Europe/Bucharest >> >> 3. I have viewed the bug in the web interface >> >> The creation date shown is 2011-03-13 10:09 >> >> Therefore the database will store the times in the local time zone, >> and not in UTC . When the next major release is available, I will be >> happy to update the SOAP API to be in line with the core APIs . Until >> then, I will adjust the SOAP API to remove this offset and send times >> in GMT. >> >> Thanks, >> >> Robert >> >> > >> > Paul >> > On Tue, Nov 8, 2011 at 1:15 PM, David Hicks <d...@hx...> wrote: >> >> >> >> On Tue, 2011-11-08 at 15:07 +0200, Robert Munteanu wrote: >> >> > Are you sure that the time in the database is set in UTC? If that's >> >> > true, I'm trying to solve a problem which does not exist. >> >> >> >> Perhaps not in every case. I only checked the function in bug_api that >> >> is called to insert a new issue into the database - and I only checked >> >> against the submission timestamp field. >> >> >> >> The SOAP API or other parts of MantisBT may feed in something other >> >> than >> >> db_now() or time() for timestamps. It might be worth grepping the >> >> source >> >> code for SQL statements that refer to timestamp columns and working >> >> backwards to ensure that db_now() or time() is being used to provide >> >> the >> >> value. >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> RSA(R) Conference 2012 >> >> Save $700 by Nov 18 >> >> Register now >> >> http://p.sf.net/sfu/rsa-sfdev2dev1 >> >> _______________________________________________ >> >> mantisbt-dev mailing list >> >> man...@li... >> >> https://lists.sourceforge.net/lists/listinfo/mantisbt-dev >> >> >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > RSA(R) Conference 2012 >> > Save $700 by Nov 18 >> > Register now >> > http://p.sf.net/sfu/rsa-sfdev2dev1 >> > _______________________________________________ >> > mantisbt-dev mailing list >> > man...@li... >> > https://lists.sourceforge.net/lists/listinfo/mantisbt-dev >> > >> > >> >> >> >> -- >> Sent from my (old) computer >> >> >> ------------------------------------------------------------------------------ >> RSA(R) Conference 2012 >> Save $700 by Nov 18 >> Register now >> http://p.sf.net/sfu/rsa-sfdev2dev1 >> _______________________________________________ >> mantisbt-dev mailing list >> man...@li... >> https://lists.sourceforge.net/lists/listinfo/mantisbt-dev > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > mantisbt-dev mailing list > man...@li... > https://lists.sourceforge.net/lists/listinfo/mantisbt-dev > > -- Sent from my (old) computer |