getTargetOffsetSecs method
Implementation
Future<int?> getTargetOffsetSecs(
SchemaMetaData smd, DbTransaction transaction) async {
int? targetOffsetSecs;
try {
UserDto? userDto = await getCurrentUserDto(smd, transaction);
targetOffsetSecs = userDto!.request_offset_secs;
} on SqlException catch (e) {
if (e.sqlExceptionEnum == SqlExceptionEnum.ENTRY_NOT_FOUND) {
targetOffsetSecs = NumberUtils.randInt(0, TimeUtils.C_SECS_IN_DAY);
}
}
return targetOffsetSecs;
}