use js date instead of moment in bg