如何将当前时间在数据库中表示的开始时间和结束时间之间的数据返回为Time(7):
#include <stdio.h>
#include <dirent.h>
#include <sys/stat.h>
#include <string.h>
#include <unistd.h>
void inodes();
int main()
{
printf(" dirent | stat | link to\n");
printf("-----------+------------+--------\n");
inodes();
return 0;
}
void inodes()
{
DIR* directory = opendir(".");
struct dirent* entry = NULL;
struct stat status;
ino_t self = -1;
ino_t parent = -1;
while ((entry = readdir(directory))) {
stat(entry->d_name, &status);
if (strcmp(entry->d_name, ".") == 0) {
self = status.st_ino;
printf("%10.llu | %10.llu | self\n", entry->d_ino, self);
}
if (strcmp(entry->d_name, "..") == 0) {
parent = status.st_ino;
printf("%10.llu | %10.llu | parent\n", entry->d_ino, parent);
}
}
if (self != parent) {
if (chdir("..") != -1) {
inodes();
}
}
}
,查询是:
public partial class ParkingLocation
{
public int Id { get; set; }
[Required]
[StringLength(150)]
public string StartAddress { get; set; }
[Required]
[StringLength(150)]
public string EndAddress { get; set; }
public double StartLongitude { get; set; }
public double StartLatitude { get; set; }
public double EndLongitude { get; set; }
public double EndLatitude { get; set; }
public TimeSpan StartTime { get; set; }
public TimeSpan EndTime { get; set; }
}
然而,这会返回错误。有人可以告诉我我在这里穿的是什么。
感谢。