Formatting timestamps in the kernel
Sept. 17, 2013
11:18 p.m.
My driver creates an entry in /proc that displays time related events. Is there a way to format timestamps, as absolute date & time, honoring timezones etc., within the kernel? I think I read somewhere that timezones are considered a userspace concept, and as such are not supported within the kernel. Thanks, Neil
Sept. 18, 2013
12:07 a.m.
On Tue, 17 Sep 2013 16:18:51 -0700, Neil Baylis said:
I think I read somewhere that timezones are considered a userspace concept, and as such are not supported within the kernel.
Correct. Your best bet is probably to use "seconds and fractions since boot", since you can steal all the code you need from printk(). Next best is to use epoch seconds and fractions.
4714
Age (days ago)
4715
Last active (days ago)
1 comments
2 participants
participants (2)
-
Neil Baylis -
Valdis.Kletnieks@vt.edu