문제

I'm trying to get date from timeuuid without calling dateOf(id) function in cqlsh. So, is there any function in phpcassa that can convert timeuuid to date ?

도움이 되었습니까?

해결책

You can use the $time attribute of \phpcassa\UUID objects to get a unix timestamp, like so:

$timeuuid = UUID::uuid1();
echo "timestamp: $timeuuid->time";

From there it's easy to make other date and time objects.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top