Comments (5)
I'll need more info, as my manipulations stick to 32bit and below. What's the actual error or problem?
from dart-uuid.
uuid: ^4.3.2
void main() {
print(const Uuid().v7());
print(const Uuid().v7());
}
I wanted to use UUID v7, generate them on multiple machines, and sort them chronologically,
javascript version generated an invalid ke, so I couldn't sort chronologically.
<javascript>
f3b80000-2d78-7e3e-9214-d7b3935cab87
f3b80000-2d79-7fee-9238-9c2a18c4d2f1
<macOs>
flutter: 018cf3b7-9411-7ebf-bdc2-bf9e957ac16f
flutter: 018cf3b7-942d-7673-88ef-5abe52ba7c14
from dart-uuid.
Hmm, I'll have to do some testing. Also make sure you are taking timezones into account. But this does look truncated.
I'll do some testing today and figure it out.
Here is how to adjust timezones in dart
import 'package:timezone/data/latest.dart' as timezone;
import 'package:timezone/timezone.dart' as timezone;
....
final now = DateTime.now();
timezone.initializeTimeZones();
final pacificTimeZone = timezone.getLocation('America/Los_Angeles');
final date = timezone.TZDateTime.from(now, pacificTimeZone);
from dart-uuid.
Ok, I can confirm it's truncation. I fixed it for v7 but found a related bug in v6. But it's trickier to fix, but I should have a new version with fixes soon
from dart-uuid.
fixed in 4.3.3
from dart-uuid.
Related Issues (20)
- How to convert the generated UUID into int type? HOT 1
- Uuid.v4() not validated in python HOT 1
- The constructor being called isn't a const constructor. HOT 9
- v4 duplicate issue HOT 17
- v7: Uint64List not supported by dart2js. and v6: Uint64 accessor not supported by dart2js.
- is there a similar implementation to javas name UUID from bytes? HOT 1
- Is there a way to check/validate if is a valid uuid? HOT 1
- UuidValue, internal value can be uppercase. HOT 3
- @experimental annotation on UuidValue HOT 2
- UuidValue default constructor breaking behavior HOT 3
- 4.2.0 version is incompatible with flutter 3.13 HOT 2
- Problem after updating to latest version with CryptoRNG HOT 7
- dev dependencies not compatible to flutter 3.3.10 stable HOT 3
- Parsing UUID v4 without hyphens HOT 7
- 4.3.1 version is incompatible with flutter 3.16 HOT 3
- Execution failed for task ':app:mergeExtDexDebug'. after installing uuid 4.3.3 HOT 2
- A bug in generateInternal() method in MathRNG class HOT 2
- Duplicate UUIDs - V5 inconsistencies when using UTF8/Unicode characters HOT 3
- Action Required: Fix Renovate Configuration
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dart-uuid.