Explorar o código

weather-darksky: Show local time in the current weather output

Will Storey %!s(int64=8) %!d(string=hai) anos
pai
achega
8b96978c36
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      weather-darksky.tcl

+ 6 - 0
weather-darksky.tcl

@@ -219,6 +219,12 @@ proc ::wds::output_current {chan geonames darksky} {
 	append output [::wds::format_decimal [dict get $darksky longitude]]
 	append output "°W)"
 
+	append output " \002Local time\002: "
+	append output [clock format [dict get $darksky time] \
+		-format "%H:%M" \
+		-timezone :[dict get $darksky timezone] \
+	]
+
 	append output " \002Conditions\002: "
 	append output [dict get $darksky summary]
 	$::wds::output_cmd "PRIVMSG $chan :$output"