Deleted articles cannot be recovered. Draft of this article would be also deleted. Are you sure you want to delete this article?
mix compile時に出力されるlocaleエラー 単純にElixirだけインストールした環境だとlocaleの設定がデフォルトのため警告がでることがある warning: the VM is running with native name encoding of latin1 which may cause Elixir to malfunction as it expects utf8. Please ensure your locale is set to UTF-8 (which can be verified by running "locale" in your shell) この環境はElixirが不具合を引き起こす可能性のあるlatin1(iso-8859-1)で起動しているので、localeをUTF8に設定してください。
やりたいこと 下記のような日付と時間を扱った処理をスマートにやるにはどうすればよいか調べてみた。 現在のロケールの現在時刻から12時間進めた日時が欲しい DBに保存した日付データをn日加算したい Elixirでの日付/時間 日時は基本的にタプルで持つ。現在時刻はErlangのCalendarモジュールから取得できる。 # UTC現在時刻 utc_now = :calendar.universal_time {{2015, 10, 20}, {8, 12, 25}} # ローカル現在時刻 jst_now = :calendar.local_time {{2015, 10, 20}, {17, 11, 17}} use Timex # 10月31日の1ヶ月後 next_month = {{2015, 10, 31}, {0, 0, 0}} |> Date.from |> Date.shift(
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く