-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Convert number in 64 bit integer #44
Comments
sorry i find the solution |
javascript does not have all 64 bits; the number is internally stored as a double which truncates the bits I have a wrapper for Int64 for the id's but it doesn't really appear on the javascript side What is the now object? Is it a scalar you want to store or a table or dataset of many timestamps? |
a dataset, i finally found a solution like this // write b.writeUInt32BE(big, 0) // 00 00 01 53 00 00 00 00 My object is not a 64 bit integer in javascript but it's stored in 64bit integer in HDF5 file I have another question : is it possible to add Attributes to a Dataset ? |
property value pairs get written as attributes. To write them after the dataset exists I'm forgetting and will look into it. For getting them without opening the dataset there is the getDatasetAttributes on groups and file. https://hdf-ni.github.io/hdf5.node/tut/attributes-tutorial.html |
Hello,
i need to convert a javascript timestamp to HDF5 64 bit integer but i can't find a solution.
i tried this :
var buffer = Buffer.alloc(8); var now = new Date().getTime(); buffer.write(now.toString()); buffer.type=H5Type.H5T_STD_I64LE; h5lt.makeDataset(ContexteOptm.id,'DateMAJContexteOptm',buffer)
but instead of 1491403310065 i have 3689345520468833329
Anyone have an idea ?
Thanks a lot
The text was updated successfully, but these errors were encountered: