Forums Register Login

lastModified return

+Pie Number of slices to send: Send
What actually lastModified method returns? I got some number that apparently has nothing to do with what is displayed in Windows Explorer. If I need to parse or convert the result some how, how do I do that?
Many thanks!
Bye!
+Pie Number of slices to send: Send
It returns a long, you can use that value to create a Date object that will tell you the actual date it was last modified.
+Pie Number of slices to send: Send
Is that number "epoch seconds"?
+Pie Number of slices to send: Send
Yup, sounds about right. From January 1, 1970. Date has a constructor that takes a long, you pass that value to it, call toString(), will show you a date in the form of dow mon dd hh:mm:ss zzz yyyy (day of week, month, day of month, hours, minutes, seconds, timezone, year).
He does not suffer fools gladly. But this tiny ad does:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 884 times.
Similar Threads
Timestamping in Hibernate
Delete Files Older than 'n' days
file.lastmodified () problem
Synchronizing without blocking in a servlet filter
Implementing a file cache
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:19:00.