Bug 45089 - tstamp granularity attribute
Summary: tstamp granularity attribute
Status: RESOLVED WONTFIX
Alias: None
Product: Ant
Classification: Unclassified
Component: Core tasks (show other bugs)
Version: 1.8.2
Hardware: All All
: P2 enhancement with 2 votes (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords: PatchAvailable
Depends on:
Blocks: 47423
  Show dependency tree
 
Reported: 2008-05-28 07:11 UTC by Mario Frasca
Modified: 2015-06-10 13:53 UTC (History)
0 users



Attachments
simple implementation of enhancement. (1.27 KB, patch)
2008-05-28 07:11 UTC, Mario Frasca
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Frasca 2008-05-28 07:11:35 UTC
Created attachment 22025 [details]
simple implementation of enhancement.

here at office we need running a scheduled job every so many minutes.  we are using windows and its task scheduler.  we are not guaranteed that the job will be run within a minute from the scheduled time, but we need to timestamp our files according to the desired time, not the actual time.

for this reason I thought I could use a "granularity" property in the tstamp core task.  for our purposes it would be enough to assume "minutes" as unit...

this is an example of what I mean:
<tstamp granularity="15" >
  <format property="start.date" pattern="yyyy-MM-dd" timezone="Z"/>
  <format property="start.time" pattern="HH:mm:ss" timezone="Z"/>
</tstamp>

even if Windows was so busy that it could not serve the request before - say - 15:31:26, my start.time property would still be "15:30:00".  in fact this value would be stored to the property until 15:44:59 (given 15 minutes granularity)...

the implementation is very easy and we already have it here...  maybe it could be useful to others, too...
Comment 1 Jan Mat 2015-06-10 13:53:19 UTC
Close after 7yrs of stillness.