This is a known Erlang bug, already fixed in R15B03: http://erlang.org/pipermail/erlang-questions/2013-January/071698.html
--steve On Tue, Oct 8, 2013 at 7:08 PM, jeffrey k eliasen <[email protected]> wrote: > Well that's interesting… it likes UTC, it likes US/PST, but it doesn't > like the timezone I'm in. Any thoughts as to how to fix this? > > escorpiao:etc seawolf$ sudo ln -sf /usr/share/zoneinfo/UTC /etc/localtime > Password: > escorpiao:etc seawolf$ date > Tue Oct 8 23:01:57 UTC 2013 > escorpiao:etc seawolf$ /usr/local/Cellar/riak/1.4.1/erts-5.9.1/bin/erl > Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] > [kernel-poll:false] > > Eshell V5.9.1 (abort with ^G) > 1> erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}}, true). > {{2013,9,28},{8,0,35}} > 2> q(). > ok > escorpiao:etc seawolf$ sudo ln -sf /usr/share/zoneinfo/Asia/Brunei > /etc/localtime > escorpiao:etc seawolf$ date > Wed Oct 9 07:03:23 BNT 2013 > escorpiao:etc seawol/usr/local/Cellar/riak/1.4.1/erts-5.9.1/bin/erl > Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] > [kernel-poll:false] > > Eshell V5.9.1 (abort with ^G) > 1> erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}}, true). > ** exception error: bad argument > in function erlang:localtime_to_universaltime/2 > called as > erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}},true) > 2> q(). > ok > escorpiao:etc seawolf$ sudo ln -sf /usr/share/zoneinfo/US/Pacific > /etc/localtime > escorpiao:etc seawolf$ date > Tue Oct 8 16:07:01 PDT 2013 > escorpiao:etc seawolf$ /usr/local/Cellar/riak/1.4.1/erts-5.9.1/bin/erl > Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] > [kernel-poll:false] > > Eshell V5.9.1 (abort with ^G) > 1> erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}}, true). > {{2013,9,28},{15,0,35}} > 2> q(). > ok > 3> escorpiao:etc seawolf$ > > > ---------- > > jeffrey k eliasen - technologist, philosopher, agent of change > > blog <http://jeff.jke.net> | > linkedin<http://www.linkedin.com/pub/jeffrey-eliasen/3/a83/b76>| > google+ <https://plus.google.com/108439057368360855020/posts> | > facebook<http://facebook.com/jeffrey.eliasen>| > twitter <http://twitter.com/jeffreyeliasen> > > > On Oct 9, 2013, at 03:10 , Luke Bakken <[email protected]> wrote: > > Hi Jeff, > > Just for kicks, change your machine's time zone to GMT, verify via the > "date" command, and re-try the Erlang snippet. > > -- > Luke Bakken > CSE > [email protected] > > > On Thu, Oct 3, 2013 at 6:38 PM, jeffrey k eliasen <[email protected]> wrote: > >> Interesting… looks like that Erlang doesn't like something. I don't >> actually know what to do from here (Erlang is still a big black box to me). >> >> escorpiao:~ seawolf$ /usr/local/Cellar/riak/1.4.1/erts-5.9.1/bin/erl >> Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] >> [kernel-poll:false] >> >> Eshell V5.9.1 (abort with ^G) >> 1> erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}}, true). >> ** exception error: bad argument >> in function erlang:localtime_to_universaltime/2 >> called as >> erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}},true) >> 2> q(). >> ok >> >> >> ---------- >> >> jeffrey k eliasen - technologist >> blog <http://jeff.jke.net/> | >> linkedin<http://www.linkedin.com/pub/jeffrey-eliasen/3/a83/b76>| >> google+ <https://plus.google.com/108439057368360855020/posts> | >> facebook<http://facebook.com/jeffrey.eliasen>| >> twitter <http://twitter.com/jeffreyeliasen> >> >> On Oct 4, 2013, at 05:39 , Luke Bakken <[email protected]> wrote: >> >> Homebrew installed Riak will use the Erlang located in this directory: >> >> /usr/local/Cellar/riak/1.4.2/erts-5.9.1/bin/erl >> >> Could you retry the code snippet using the erl located there? Also, the >> output of which -a erl could be useful. I think you should uninstall >> your homebrew-installed Erlang as it's a more recent version than the one >> installed via homebrew for Riak. Personally I use kerl to manage Erlang >> versions instead of homebrew. >> >> Thanks >> -- >> Luke Bakken >> CSE >> [email protected] >> >> >> On Wed, Oct 2, 2013 at 7:25 PM, jeffrey k eliasen <[email protected]> wrote: >> >>> Thanks for looking into this! >>> >>> Same machine: >>> >>> escorpiao:programming_in_c seawolf$ date >>> Thu Oct 3 10:22:31 BNT 2013 >>> escorpiao:programming_in_c seawolf$ erl >>> Erlang R16B01 (erts-5.10.2) [source] [64-bit] [smp:4:4] >>> [async-threads:10] [hipe] [kernel-poll:false] [dtrace] >>> >>> Eshell V5.10.2 (abort with ^G) >>> 1> erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}}, true). >>> {{2013,9,28},{0,0,35}} >>> 2> q(). >>> ok >>> escorpiao:programming_in_c seawolf$ >>> >>> How do I know for sure that I'm using the same Erlang binary as Riak is? >>> I installed it via Homebrew and don't know off the top of my head how to >>> verify which Erlang it's picking up (or if I even have more than one). >>> >>> -- >>> >>> jeffrey k eliasen >>> >>> Find and follow me on: >>> Blog: http://jeff.jke.net >>> Twitter: http://twitter.com/jeffreyeliasen >>> Facebook: http://facebook.com/jeffrey.eliasen >>> >>> On Oct 2, 2013, at 23:44 , Luke Bakken <[email protected]> wrote: >>> >>> Hi Jeff, >>> >>> Can you provide the output of the date command on the machine where >>> Riak is running as well as the one from which you're running curl? I'm >>> assuming it's the same workstation, but I'd like to be sure. >>> >>> Based on the stack traces you provide, the >>> localtime_to_universaltimefunction is failing when called with >>> [{{2013,9,28},{8,0,35}},true] as the arguments, which really doesn't >>> make sense. >>> >>> Could you run that method via the erl command in the Erlang build used >>> by your Riak installation? I have built Riak from source so erl is in the >>> erts-5.9.1/bin directory, for instance: >>> >>> lbakken ~/Projects/basho/riak_ee-1.4/dev/dev1/erts-5.9.1/bin >>> ((riak_ee-1.4.2)) >>> $ ./erl >>> Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:8:8] [async-threads:0] >>> [kernel-poll:false] >>> >>> Eshell V5.9.1 (abort with ^G) >>> 1> erlang:localtime_to_universaltime({{2013,9,28},{8,0,35}}, true). >>> {{2013,9,28},{15,0,35}} >>> 2> q(). >>> ok >>> >>> -- >>> Luke Bakken >>> CSE >>> [email protected] >>> >>> >>> >> >> > > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
