Your code is alright , your variable d should be at offset of 48 hours from the current time on your server.
Make sure the server and your clients are running on the same time otherwise request your server admins to fix the time on your deployment machine.
You would also notice this difference if your client is opening a browser in e.g. Japan and your server is running in USA because of the standard time difference.