Re: Convert SNAPSHOT timestamps from utc to local time
On 3/19/08, David Delbecq <[EMAIL PROTECTED]> wrote: > to find out if their commit are part of a given snapshot" :) Generally > in project, i don't like to see attempts at using a tool for something > it was not designed for, unless there are string reasons behind this. I think even Mathus would agree this is not a best practice. But that's not really what was asked. ;-) Wayne - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Convert SNAPSHOT timestamps from utc to local time
Agreed, though there's a lot of things that are not complex. But as I said, nobody here ever use UTC (and there's very little chance we are going to ever need it). This would obviously be possible to teach our developer what UTC is, and how to shift the time by themselves. But I really think this would be useless inside our company. It's just that it's far easier than maintaining a local fork of a plugin, considering your requirement it that "developper should be able to find out if their commit are part of a given snapshot" :) Generally in project, i don't like to see attempts at using a tool for something it was not designed for, unless there are string reasons behind this. One of the purposes of snapshots numbering it to guarantee their order. If you use localtime you risk to break that, unless you don't forget to include the UTC shift used at build time. If you don't take care, when the time changes from summer to winter, and your snaphsots build make 2 snapshots (for whatever reason) around the time change, you can end up with most recent snapshot having the oldest time... -- David Delbecq Institut Royal Météorologique Ext:557 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Convert SNAPSHOT timestamps from utc to local time
> -Message d'origine- > De : David Delbecq [mailto:[EMAIL PROTECTED] > Envoyé : mercredi 19 mars 2008 08:36 > À : Maven Users List > Objet : Re: Convert SNAPSHOT timestamps from utc to local time > > Just a stupid suggestion: > > Wouldn't it be much easier to either > > 1) Setup the local clock on snapshots generating server to > french time and have that server says that is "utc" time? > That's a quick and dirty, but it's not like you would have to change I'm not admin on this server and it is used by lots of other people. So changing server time isn't an option :). > > or > > 3) Have people look, when they explore snapshot repository > using their web browser, at the "time" column that appear > next to file list, which is expressed in server local time afaik. There's no column for this. However, it might be a feature request for Archiva, granted. > > or even better > > 2) Take 10 minute to teach your team members what UTC mean > (substract one hour from local time in winter, 2 hours in > summer)? It's not like it is difficult calculation to know utc time. Agreed, though there's a lot of things that are not complex. But as I said, nobody here ever use UTC (and there's very little chance we are going to ever need it). This would obviously be possible to teach our developer what UTC is, and how to shift the time by themselves. But I really think this would be useless inside our company. About the patch, I already got there. The last thing I'm unable to find is how to configure plexus to inject some system property. My code already works using the boolean given by Boolean.parseBoolean(System.getProperty("useLocalTime")), apart from this the code is very very simple (maybe 5 or 10 lines of modified code maximum). Btw, do you know what I should do so that plexus would inject the value given in -DuseLocalTime in the SnapshotTransformation class below: org.apache.maven.artifact.transform.ArtifactTransformation snapshot org.apache.maven.artifact.transform.SnapshotTransformation org.apache.maven.artifact.manager.WagonManager org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager I tried adding a ... block, but I guess I'm missing something and I have been unable to find the right documentation inside the plexus doc. Cheers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Convert SNAPSHOT timestamps from utc to local time
Just a stupid suggestion: Wouldn't it be much easier to either 1) Setup the local clock on snapshots generating server to french time and have that server says that is "utc" time? That's a quick and dirty, but it's not like you would have to change or 3) Have people look, when they explore snapshot repository using their web browser, at the "time" column that appear next to file list, which is expressed in server local time afaik. or even better 2) Take 10 minute to teach your team members what UTC mean (substract one hour from local time in winter, 2 hours in summer)? It's not like it is difficult calculation to know utc time. I work with a belgian time, we are all in same building, so, i think, we are in same timezone, and we have no difficulties to cope with UTC time :) Heck, all our company servers anyway speaks only utc ^^. And on linux stations, the simple "date" commands tells me the UTC shift am at: $ date mercredi 19 mars 2008, 08:30:38 (UTC+0100) regards En l'instant précis du 18/03/08 17:04, MATHUS Baptiste s'exprimait en ces termes: My company is french, we sell to frenchies and have almost no chance to ever sell to another country ;). In fact, we work in the healthcare area and there's lots and lots of administrative rules that even make it difficult to follow only for the french market :-). So, I'll hack the code and propose a patch with some additional parameter to tune this behaviour, hoping it finds a way into the trunk one day. Cheers. -Message d'origine- De : Wayne Fay [mailto:[EMAIL PROTECTED] Envoyé : mardi 18 mars 2008 16:32 À : Maven Users List Objet : Re: Convert SNAPSHOT timestamps from utc to local time Not that I'm aware of, at least, not today. If you really must have this feature, you could add a configuration and hack the code, but as with any user-provided patch, there's no guarantee it would be accepted into the core if you contributed it via Jira. Maven uses UTC on purpose so that timestamps are gloabally unique and incrementing. Then when I'm working in CA and the rest of my team is in NJ, and we're both deploying to the same corporate repo, my 11am (PT) builds are properly considered newer than your 1pm (ET) builds. If you're all in the same timezone, this seems like less of a problem, but how common is that in today's corporate climate? I know my small team of 5 people is in 3 timezones. Wayne On 3/18/08, MATHUS Baptiste <[EMAIL PROTECTED]> wrote: Hi all, We're having a small problem with deployment: UTC is being used for replacing SNAPSHOT with timestamp. For us, UTC is one hour behind local time. In some days, it will be 2 hours. It's a bit annoying because people are sometimes wondering which snapshot is corresponding to their commit. We'd prefer being able to deploy using local time (at the moment, for example utc is something like 11h47, and our local time is 12h47). I looked at the code and found that the code is in the org.apache.maven.artifact.transform.SnapshotTransformation class. Is there a way to define some global variable (used by the timezone or something like that) to shift generated timestamps? Thanks in advance. Cheers. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- David Delbecq Institut Royal Météorologique Ext:557 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Convert SNAPSHOT timestamps from utc to local time
My company is french, we sell to frenchies and have almost no chance to ever sell to another country ;). In fact, we work in the healthcare area and there's lots and lots of administrative rules that even make it difficult to follow only for the french market :-). So, I'll hack the code and propose a patch with some additional parameter to tune this behaviour, hoping it finds a way into the trunk one day. Cheers. -Message d'origine- De : Wayne Fay [mailto:[EMAIL PROTECTED] Envoyé : mardi 18 mars 2008 16:32 À : Maven Users List Objet : Re: Convert SNAPSHOT timestamps from utc to local time Not that I'm aware of, at least, not today. If you really must have this feature, you could add a configuration and hack the code, but as with any user-provided patch, there's no guarantee it would be accepted into the core if you contributed it via Jira. Maven uses UTC on purpose so that timestamps are gloabally unique and incrementing. Then when I'm working in CA and the rest of my team is in NJ, and we're both deploying to the same corporate repo, my 11am (PT) builds are properly considered newer than your 1pm (ET) builds. If you're all in the same timezone, this seems like less of a problem, but how common is that in today's corporate climate? I know my small team of 5 people is in 3 timezones. Wayne On 3/18/08, MATHUS Baptiste <[EMAIL PROTECTED]> wrote: > Hi all, > > We're having a small problem with deployment: UTC is being used for > replacing SNAPSHOT with timestamp. > For us, UTC is one hour behind local time. In some days, it will be 2 > hours. > > It's a bit annoying because people are sometimes wondering which > snapshot is corresponding to their commit. > We'd prefer being able to deploy using local time (at the moment, for > example utc is something like 11h47, and our local time is 12h47). > > I looked at the code and found that the code is in the > org.apache.maven.artifact.transform.SnapshotTransformation class. > Is there a way to define some global variable (used by the timezone or > something like that) to shift generated timestamps? > > Thanks in advance. > Cheers. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Convert SNAPSHOT timestamps from utc to local time
Not that I'm aware of, at least, not today. If you really must have this feature, you could add a configuration and hack the code, but as with any user-provided patch, there's no guarantee it would be accepted into the core if you contributed it via Jira. Maven uses UTC on purpose so that timestamps are gloabally unique and incrementing. Then when I'm working in CA and the rest of my team is in NJ, and we're both deploying to the same corporate repo, my 11am (PT) builds are properly considered newer than your 1pm (ET) builds. If you're all in the same timezone, this seems like less of a problem, but how common is that in today's corporate climate? I know my small team of 5 people is in 3 timezones. Wayne On 3/18/08, MATHUS Baptiste <[EMAIL PROTECTED]> wrote: > Hi all, > > We're having a small problem with deployment: UTC is being used for > replacing SNAPSHOT with timestamp. > For us, UTC is one hour behind local time. In some days, it will be 2 > hours. > > It's a bit annoying because people are sometimes wondering which > snapshot is corresponding to their commit. > We'd prefer being able to deploy using local time (at the moment, for > example utc is something like 11h47, and our local time is 12h47). > > I looked at the code and found that the code is in the > org.apache.maven.artifact.transform.SnapshotTransformation class. > Is there a way to define some global variable (used by the timezone or > something like that) to shift generated timestamps? > > Thanks in advance. > Cheers. > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Convert SNAPSHOT timestamps from utc to local time
Hi all, We're having a small problem with deployment: UTC is being used for replacing SNAPSHOT with timestamp. For us, UTC is one hour behind local time. In some days, it will be 2 hours. It's a bit annoying because people are sometimes wondering which snapshot is corresponding to their commit. We'd prefer being able to deploy using local time (at the moment, for example utc is something like 11h47, and our local time is 12h47). I looked at the code and found that the code is in the org.apache.maven.artifact.transform.SnapshotTransformation class. Is there a way to define some global variable (used by the timezone or something like that) to shift generated timestamps? Thanks in advance. Cheers.