Getting the user's timezone in KRL

A follow-up question to Mike's question about getting the time in KRL. Is it possible to get the user's timezone? There is a timezone predicate,

time:timezone(<arg>)

but it looks like it requires an argument. How do I use that?

Answers


time:timezone(<arg>) is a predicate which returns true or false.

I will correct the documentation, but time:timezone() takes a timezone abbreviation and checks the user's geo-location (based upon IP address) and returns true or false

   rule first_rule is active {
    select when pageview ".*" setting ()
    if (time:timezone("MST")) then {
      notify("Glee alert", "Glee starts at 7pm");
    }

  }

Need Your Help

modal places at top of browser window with bootstrap

jquery twitter-bootstrap

I'm having a problem with my modal window where it is aligned to the top of the browser window. I'm thinking of moving two jQuery UI modals (ie not a lot) but this is pretty frustrating.

Apostrophes in XML and Databound Controls

asp.net html xml data-binding

In my XML, it's possible for an apostrophe to appear in a node's value:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.