• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Get the correct time from Date object

 
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am working with Quartz Job Scheduler and get a Date object returned when rescheduling a Job. I want to show the exact time of this Date object, but it seems that something is going wrong. When I print out the time I got a totally wrong time:
Mon Dec 12 14:43:40 CET 2005

Below you see the code I use:


Can you help me please?
[ June 27, 2007: Message edited by: Jeppe Fjord ]
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What Date did you set in the trigger you are trying to replace ?
Please add the following line before rescheduleJob :
 
Jeppe Sommer
Ranch Hand
Posts: 270
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Satou kurinosuke:
What Date did you set in the trigger you are trying to replace ?
Please add the following line before rescheduleJob :



Alright the above System.out.println prints out the same result:
Mon Dec 12 14:43:37 CET 2005

I found out that this date is the start time (java.util.Date startTime) of my trigger. I was just convinced that scheduler.rescheduleJob, would return the time that the job was rescheduled and not the starttime being initiated.

~ Alright I got it. Thanks for your help :-)
[ June 28, 2007: Message edited by: Jeppe Fjord ]
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, it returns the start time
 
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!