• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* Copyright (c) 2022 Huawei Device Co., Ltd.
2  * Licensed under the Apache License, Version 2.0 (the "License");
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  *     http://www.apache.org/licenses/LICENSE-2.0
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * distributed under the License is distributed on an "AS IS" BASIS,
10  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11  * See the License for the specific language governing permissions and
12  * limitations under the License.
13  */
14 
15 #include <stdio.h>
16 #include <string.h>
17 #include <time.h>
18 #include "test.h"
19 
20 extern struct tm *gmtime(const time_t *t);
21 
22 /**
23  * @tc.name      : memset_0100
24  * @tc.desc      : Test __gmtime64 method
25  * @tc.level     : Level 1
26  */
27 #define BST (+1)
28 #define CCT (+8)
29 
gmtime64_0100(void)30 void gmtime64_0100(void)
31 {
32     time_t rawtime;
33     struct tm *info;
34 
35     time(&rawtime);
36     info = gmtime(&rawtime);
37 
38     if (info < 0) {
39         t_error("%s __gmtime64 error get result is %2d\n", __func__, (info->tm_hour + CCT) % 24);
40     }
41 }
42 
main()43 int main()
44 {
45     gmtime64_0100();
46     return t_status;
47 }