Which version of Julia are you using? You should have got this warning on v0.6.2:
julia> convert(Int, Dates.now())
WARNING: convert(::Type{R}, x::Dates.DateTime) where R <: Real is deprecated, use R(Dates.value(x)) instead.
Stacktrace:
[1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
[2] convert(::Type{Int64}, ::DateTime) at ./deprecated.jl:57
[3] eval(::Module, ::Any) at ./boot.jl:235
[4] eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:66
[5] macro expansion at /home/tamas/.julia/v0.6/Revise/src/Revise.jl:775 [inlined]
[6] (::Revise.##17#18{Base.REPL.REPLBackend})() at ./event.jl:73
while loading no file, in expression starting on line 0
63656357005203
The lesson is that you should use the API provided for the purpose. There is literally nothing that suggests that convert(::Type{Int}, ::Date) should be used for calculating \Delta from the epoch.
the real issue is that two julia epoch ms seem like a bad idea to me, and the source for needless bugs and confusion in the future. if it were me, I would deprecate one of them. I did not file this as an issue, because I do not know whether there is another reasoning here that I am unaware of.
Yes, it’s quite understandable that you’d be confused here. Tamas’ message reads a little overly harshly to me — the fact that we had this inconsistently defined was our fault, not yours. But he’s also demonstrating that on 0.6.2, that conversion is indeed deprecated. I highly recommend you update to version 0.6.