Skip to content

Commit 22da85b

Browse files
authored
Merge pull request #1824 from nickanderson/ENT-6161/master
ENT-6161/master: Added inventory for Timezone and GMT Offset
2 parents cbc4ed3 + fe228f4 commit 22da85b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

inventory/any.cf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,22 @@ bundle agent cfe_autorun_inventory_setuid
297297

298298
}
299299

300+
bundle agent cfe_autorun_inventory_timezone
301+
# @brief Inventory timezone and GMT offset
302+
{
303+
vars:
304+
"_now" int => now();
305+
306+
"timezone" -> { "ENT-6161" }
307+
string => strftime( localtime, "%Z", $(_now) ),
308+
meta => { "inventory", "attribute_name=Timezone" };
309+
310+
"gmt_offset" -> { "ENT-6161" }
311+
string => strftime( localtime, "%z", $(_now) ),
312+
meta => { "inventory", "attribute_name=Timezone GMT Offset" };
313+
314+
}
315+
300316
bundle agent cfe_autorun_inventory_loadaverage
301317
# @brief Inventory the loadaverage (Enterprise only)
302318
{

0 commit comments

Comments
 (0)