[erlang-questions] Time range event filtering

Serge Aleynikov <>
Tue Sep 10 21:46:20 CEST 2013


It should be fairly trivial to first convert the range to the UTC, and then
check if erlang:now() fits in that range.

Perhaps you can reuse of the functions in this project:
https://github.com/saleyn/gen_timed_server which implements a scheduling
supervisor that runs a child process on given days / time of day ranges.

Serge


On Tue, Sep 10, 2013 at 3:34 PM, Mark Allen <> wrote:

> At $DAYJOB, my team is working on a project where we need to compute a
> time range (like 9am to 9pm in a specified timezone) and see if
> erlang:now() is in that time range and take a different action if the bool
> is true or false.
>
> Are there any good libraries for working with time ranges like this?  I
> wanted to ask before we re-invent the wheel.  I didn't find anything
> especially appropriate on a cursory web search.
>
> Thanks.
>
> Mark
>
> Mark Allen
> Sr Software Developer
> Alert Logic
>
> E: 
>
>
>
> _______________________________________________
> erlang-questions mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130910/3969336e/attachment.html>


More information about the erlang-questions mailing list