faustinoaq changed the topic of #amber to: Welcome to Amber Framework community! | https://amberframework.org | Developer happiness, productivity and bare metal performance | GH: https://github.com/amberframework | Docs: https://docs.amberframework.org | Gitter: https://gitter.im/amberframework/amber | IRC Logger: https://irclog.whitequark.org/amber | Amber::Server.start
wontruefree has quit [Quit: bye]
_whitelogger has joined #amber
wontruefree has joined #amber
_whitelogger has joined #amber
<FromGitter> <kolyaio> trying to convert the date to use friendly format using Time.parse_iso8601
<FromGitter> <kolyaio> but got this error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5b41c3527b811a6d63d903e1]
<FromGitter> <kolyaio> the itself looks like this `2018-07-06 16:00:57 UTC`
wontruefree has quit [Quit: bye]
_whitelogger has joined #amber
marenz has joined #amber
<FromGitter> <Prutheus> @faustinoaq are you currently online?
<FromGitter> <Blacksmoke16> @kolyaio your datetime isnt in ISO8601 format, hence it fails when trying to parse it
<FromGitter> <Blacksmoke16> `p Time.parse_iso8601("2018-07-06T16:00:57Z")`
<FromGitter> <Blacksmoke16> Should b e like one of the following formats ⏎ ⏎ ```code paste, see link``` [https://gitter.im/amberframework/amber?at=5b421c8f63042f2df36024ca]
<FromGitter> <sclee15> What should I do if I wanted to make a long running service (background task thread for Amber app)
_whitelogger has joined #amber
<FromGitter> <robacarp> @sclee15 I use my mosquito task runner for that. GitHub.com/robacarp/mosquito
<FromGitter> <kolyaio> @Blacksmoke16 then what is the date time format timestamp used by Postgres in Amber orm? I want to format created_at to something more friendly.
<FromGitter> <Blacksmoke16> im not sure, never used PG
<FromGitter> <Blacksmoke16> you can define your own format tho
<FromGitter> <kolyaio> In the sql migration file I saw just timestamp field.
<FromGitter> <Blacksmoke16> is `2018-07-06 16:00:57 UTC` what it looks like in the db?
<FromGitter> <Blacksmoke16> if you are using Granite im not sure why you need to do a Time.parse() anyway? If you get a record from db using like Model.find, cant just do `created_at.to_rfc3339` for example?
<FromGitter> <Blacksmoke16> or even supply your own format to display the timestamp in
<FromGitter> <kolyaio> I get it from granite orm but i want to display it differently in the view.
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/4gyd
<FromGitter> <Blacksmoke16> so could just do one of those `.to_*`methods and customize format
<FromGitter> <Prutheus> @faustinoaq could you please answer a quick question?
<FromGitter> <kolyaio> @Blacksmoke16 Hurray!!!! Thanks :-D
<FromGitter> <Blacksmoke16> np
marenz has quit [Ping timeout: 244 seconds]
<FromGitter> <ZeroPointEnergy> Can anyone help me understand why it is that if I check a param for nil with a validation why do I have to check it again if I want to pass it to a method? Or am I doing something wrong?
<FromGitter> <Sija> hi there! is any1 tried compiling amber with Crystal `master`?
<FromGitter> <Blacksmoke16> @ZeroPointEnergy do you have an example code?
<FromGitter> <Blacksmoke16> i think its because crystal itself doesnt know for sure that param can not be nil
<FromGitter> <Blacksmoke16> if using granite can use `field! name : String` notice the `!` on field, tells granite/crystal that it is not nil
<FromGitter> <ZeroPointEnergy> @Blacksmoke16 ah thanks, did not know that. Will try to figure it out with a reduced example. Solved it in my code for now
<FromGitter> <Blacksmoke16> 👍