{erlang:date(), erlang:time()}.
{{2014,12,20},{9,22,56}}

On Saturday, December 20, 2014 10:24:29 AM UTC+3, [email protected] 
wrote:
>
> Hi guys! I'm trying to make an app that stores some appointments. For that 
> I have 2 models patient and appointment. One patient has_many appointments 
> and an appointment belongs_to a patient. The appointment has a date and a 
> time and a duration. So far so got. But when I'm trying to save and 
> appointment I get a wrong date and a time that has a {1970,4,15} extra 
> tuple.
> This is how I'm trying to populate the db:
>  http://dpaste.com/3QGX2A9
>
> but instead of getting a date like {2014,12,20} I get  
> {{2033,10,27},{4,26,52}} and time becomes  {{1970,4,15},{4,0,15}}.
> When I'm doing programare:new(id, erlang:date(), erlang:time(), 15, 
> "pacient-1"). I get what I expect: 
> {programare,id,{2014,12,20},{9,22,56},15,"pacient-1"}, but after saving I 
> get the weird stuff. Any ideas why and how to fix this? I'm using a mock db 
> adapter should that matter. 
> Thank you!
>

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/aa180273-d64b-4ec8-a760-594c0911d561%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to