Calculate upid using time and uid