summaryrefslogtreecommitdiffstats
path: root/raddb/mods-available/date
blob: 25a64da17d4953bddea2416f30498161b484d744 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#
#  Registers xlat to convert between time formats.
#
#  xlat input string is an attribute name. If this attribute is of date
#  or integer type, the date xlat will convert it to a time string in
#  the format of the format config item.
#
#  If the attribute is a string type, date will attempt to parse it in
#  the format specified by the format config item, and will expand
#  to a Unix timestamp.
#
date {
	format = "%b %e %Y %H:%M:%S %Z"

	# Use UTC instead of local time.
	#
	#  default = no
#	utc = yes
}

#
#  The WISPr-Session-Terminate-Time attribute is of type "string",
#  and not "date".  Use this expansion to create an attribute
#  that holds an actual date:
#
#	Tmp-Date-0 := "%{wispr2date:&reply:WISPr-Session-Terminate-Time}"
#
date wispr2date {
	format = "%Y-%m-%dT%H:%M:%S"

	# Use UTC instead of local time.
	#
	#  default = no
#	utc = yes
}